用户和角色表多对多关系
select a.*,GROUP_CONCAT(c.id) as roles from tb_users a,tb_users_roles b,tb_roles c where a.id=b.user_id and b.role_id=c.id and b.role_id in (1,40) group by a.id
用户和角色表多对多关系
select a.*,GROUP_CONCAT(c.id) as roles from tb_users a,tb_users_roles b,tb_roles c where a.id=b.user_id and b.role_id=c.id and b.role_id in (1,40) group by a.id