Created
May 9, 2015 12:40
-
-
Save stefanosc/450af597047da83a07b8 to your computer and use it in GitHub Desktop.
Revisions
-
Stefano Schiavi created this gist
May 9, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ SELECT e.album_id FROM jos_hwdms_media as m LEFT JOIN jos_hwdms_album_map e ON m.id = e.media_id LEFT JOIN jos_hwdms_category_map as h ON m.id = h.element_id LEFT JOIN jos_categories as cat ON cat.id = h.category_id LEFT JOIN jos_users as u1 ON m.created_user_id = u1.id LEFT JOIN `jos_hwdms_users` AS u ON u.id = u1.id WHERE u.access IN (1,1,2,3,4,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,30) AND u.status = 1 AND u.private = 0 AND cat.published = 1 AND (m.language = 'en-GB' || m.language = '*' ) AND m.access IN (1,1,2,3,4,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,30) AND m.published = 1 AND e.album_id!='' GROUP BY e.album_id