一键查询SQL语句
用户的权限查询:
$sql = "select title from access where id in (select access_id from role_access where role_id in (select id from role where id in (select role_id from user_role where uid='{$uid}')))";
$aaa=Db::query($sql);
SQL语句解析:
$sql="select 权限名 from 权限表名 where 权限id in(select 关联表权限id from 角色与权限关系表 where 关联表角色id in(select 角色id from 角色表 where 角色id in(select 关联角色id from 用户与角色关联表 where 关联用户id='{用户id值}')))";