I\'m creating a paging class and need to pass in two parameters to my MySQL stored procedure for the LIMIT clause.
I\'m passing them in as INTs and trying something
The following worked just fine in MySQL 5.5.35. It also worked in another procedure where the same SELECT
was used within a DECLARE . . . CURSOR
statement.
CREATE PROCEDURE `test`(
IN `lim_val` INT,
IN `lim_offset` INT
)
BEGIN
SELECT array_ident_id
FROM ArrayIdents
ORDER BY array_ident_id
LIMIT lim_val OFFSET lim_offset;
END;