vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi I am trying something simple like returning the records from a cursor in a stored procedure, here is a simple sample but I can't get it to work CREATE PROCEDURE `test`(out id integer, out description varchar(100)) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN declare last_row integer; declare c cursor for select id, description from ap_item; DECLARE CONTINUE HANDLER FOR NOT FOUND SET last_row=1; open c; c_loop:loop fetch c into id, description; if last_row = 1 then leave c_loop; end if; end loop c_loop; close c; END; Thanks james |