第1个回答 2013-08-19
hey,guy.thanks for help,but there are something wrong[ol][*]mysql> create procedure select_content()[*]? ? -> begin[*]? ? ->? ?declare used_id int;[*]ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 3[*]mysql>? ?select id from item where picid > 0 limit 0 , 1 into used_id;[*]ERROR 1327 (42000): Undeclared variable: used_id[*]mysql>? ?select * from item where id = used_id[*]? ? ->? ?union[*]? ? ->? ?select * from item where id used_id limit 0 , 4;[*]ERROR 1146 (42S02): Table \'supesite.item\' doesn\'t exist[*]mysql> end;[*]ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'end\' at line 1[*][/ol]