On Nov 17, 2004, Matt Babineau & Dan Nelson discussed: > > Has anyone run into problems with this sql syntax? > > > > LIMIT -1 > > > > I've used this extensively in my code to get back all records rather then > > specifing a limit. I've done this programmatically with PHP, so all my > > queries have a limit even if I don't need one, I just have it specify LIMIT > > -1, but apparently this functionality doesn't seem to work in 4.1??? > > From http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html : > > # LIMIT no longer accepts negative arguments. Use some large number > (maximum 18446744073709551615) instead of -1. > > not sure why it was changed, though. >
This is going to break a fair number of phpMyEdit scripts because phpMyEdit's default template recommends $opts['inc'] being set to "Value of -1 lists all records in a table" which gets converted to a SQL statement using LIMIT 0,-1 This does not make for a smooth migration from MySQL 4.0 to 4.1 and the solution suggested in the documentation is a step backwards in elegance (IMHO). Dennis Fogg -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]