Daniel DeLorme <[EMAIL PROTECTED]> wrote: > I have a query where I use a LIKE on a DATETIME field and it used to work > i.e.: WHERE article_datetime LIKE '2003-05%' > but when we upgraded to 4.1 it stopped working (it didn't return any > results). In itself I find that increased restrictiveness to accomplish > no purpose. And then I found out that the same query on a DATE field *did* > work as expected. It works on a DATE but not on a DATETIME. Where's the > logic in that? > > If possible, I would like to find someplace that has more details on the > nature of the change that was made to date/datetime checking. The changelog > for 4.1.0 isn't very informative, it only says that "DATE/DATETIME checking > is now a bit stricter to support the ability to automatically distinguish > between date, datetime, and time with microseconds."
Since 4.1 DATETIME is integer, so LIKE will not work. Use BETWEEN instead. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]