Bug in the reserver word: “LIMIT” of MySQL
Bug Syntax Highlight in SQL
agibsonsw
#2
I don’t think it is a problem with the word LIMIT but the fact that you break up the SQL statement (string) on the previous line. It is no longer recognised as part of a SQL statement, and just considered as quoted text.
If you apply (int) to $y before creating the SQL then you can create the statement as one continuous string (with embedded variables). Alternatively, using sprintf() or prepared statements may also get around this niggle.
0 Likes