Maaf, Anda mengaktifkan Adblock pada browser anda!
Atau anda tidak mengaktifkan Javascript![ Disable Your AdBlock Please ]
Home > Aplikasi Web > My SQL – GROUP_CONCAT() for Concatenate Many Rows Into a Single Text String

My SQL – GROUP_CONCAT() for Concatenate Many Rows Into a Single Text String

Concatenate Many Rows Into a Single Text String with GROUP_CONCAT() in My SQL




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

Leave a Reply

Your email address will not be published. Required fields are marked *

*