If I make a parameterized query such as
"Select user from usertable where id=@User LIMIT @Number;"
...it hurls on the @Number. If I replace it with a number in the
query instead of paramterizing it, like this:
"Select user from usertable where id=@User LIMIT 10;"
...then it works just fine. Is this some known limitation or bug, or
should I not expect to be able to make the value of the LIMIT clause a
parameter?
Thanks!
Dave
http://dev.mysql.com/doc/refman/5.0/en/user-variables.html
"User variables may be used in contexts where expressions are allowed.
This does not currently include contexts that explicitly require a literal
value, such as in the LIMIT clause of a SELECT statement, or the IGNORE N
LINES clause of a LOAD DATA statement."
--
Rik Wasmus