On 29 Oct 2003 at 18:00, Fagyal, Csongor wrote: > Any ideas what causes this behaviour? Maybe I have not upgraded my DBI > & DBD packages properly? Or are LIMIT placeholders no longer supported > in DBI with MySQL 4?
I don't think the MySQL version is relevant. The change is in DBD::mysql 2.9002, which now assumes all values substituted for placeholders are strings unless specifically told otherwise. Apparently there were situations where quotes were not being added when they should have been, which is dangerous. It's hideously annoying, since it happens even when the variable in question has never been used in anything but a numeric context, but the only place it really matters is in limits. MySQL automatically converts strings to numbers when necessary in most places, but not in limits. The arguments to LIMIT must be integer constants. You have to use bind_param() to identify the parameter as an integer. Rudy Lippan, the author of DBD::mysql, had a message about it on the dbi-users list: http://groups.google.com/groups?selm=Pine.LNX.4.44.0307291622390.14615 -100000%40elfride.ineffable.net -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]