SELECT p.`id`,p.`permission_name`,GROUP_CONCAT(g.`group_name` ORDER BY g.`group_name` ASC SEPARATOR ', ') AS 'group_name',p.`date_created`,p.`date_modified`,p.`status`
FROM `permission` p JOIN `permission_detail` pd ON p.`id`=pd.`permission_id`
JOIN `groups` g ON pd.`group_id`= g.`id`
WHERE p.`status` IS NULL
GROUP BY p.`id`
ORDER BY p.`date_modified` DESC
0 Comments