I can't seem to pass in the LIMIT clause variables into a stored procedure
http://dev.mysql.com/doc/mysql/en/select.html says:
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must be integer constants.
i.e.
Select * from table limit param1, param2;
I get a syntax error compiling the procedure, but when I replace param1 and param2 with hard coded ints, ie, 10, 10, it compiles and works fine.
Is this functionality not available? I had a similar problem w/ the Load Data Infile statement, in that it wouldn't allow me to pass in the file name as a parameter to the SPROC.
If the LIMIT clause doesn't work this way either, I will really regret building the system using SPROCS, as most of the complicated queries will have to be hard-coded in PHP to allow variable passing on the query line, err!
I hope I'm missing something.
Thanks a lot for any help you can provide.
Scott.
-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]