SELECT mp3_users_playlists id mp3_users_playlists name DATE_FORMAT mp3

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
SELECT `mp3_users_playlists`.`id`, `mp3_users_playlists`.`name`, DATE_FORMAT(`mp3_users_playlists`.`dateadd`, '%d.%m.%y, %k:%i') AS `dadd`,
(SELECT COUNT(`playlist_id`) FROM `mp3_playlists` WHERE `mp3_users_playlists`.`id`=`mp3_playlists`.`playlist_id`) AS `cnt`,
(SELECT GROUP_CONCAT(`mp3_playlists_tags`.`name`SEPARATOR ', ' ) AS 'Data'
FROM `mp3_playlists_tags`
WHERE `mp3_playlists_tags`.`pls_id`=`mp3_users_playlists`.`id`
GROUP BY `mp3_users_playlists`.`id`) AS `tags`
FROM `mp3_users_playlists`
INNER JOIN `mp3_playlists_tags`
ON `mp3_playlists_tags`.`pls_id`=`mp3_users_playlists`.`id`
WHERE `mp3_playlists_tags`.`name` IN ('pop')
GROUP BY `id`