摘要: SELECT T1.lvl,T2.* #lvl 跟查询无限下级的level一样 FROM ( SELECT @r AS _id, #变量取个别名 (SELECT @r := parent_id FROM sys_depart WHERE id = _id limit 1) AS parent_id, 阅读全文
posted @ 2021-10-20 17:59 有缘无分的朋友 阅读(619) 评论(0) 推荐(0) 编辑