I have the following code:
delimiter ; DROP PROCEDURE IF EXISTS ufk_test; delimiter // CREATE PROCEDURE ufk_test(IN highscoreChallengeId INT UNSIGNED) BEGIN
i use something like:
SET @s = CONCAT('SELECT * FROM table limit ', vLoopOrder ', ', vLoopLimit); PREPARE stmt1 FROM @s; EXECUTE stmt1; DEALLOCATE PREPARE stmt1;