SELECT c.id, (select @b:=c.id) as 'iid',
(select a._id from
(SELECT @c '_id',
(select @c:=parent_id from sys_menu where id = _id) 'parent'
from sys_menu sys,(select @c:=@b) r) a where _id is not null and parent is null) 'parent'
from (SELECT * from sys_menu s where id in(8,11)) c
请问这个sql语句错在哪里,id为8 的结果是对的,id为11的结果不对,变量传递的有问题吗