Random Record from Recordset
- by Tony Hanks
I have the fillowing Query:
SELECT a.*,
ps4_media.filename,
ps4_galleries.name as galleryname,
ps4_media_iptc.description,
ps4_media_iptc.title,
ps4_media_iptc.headline,
ps4_media.date_added,
ps4_galleries.created,
ps4_folders.name as foldername,
ps4_galleries.gallery_count FROM ps4_media_galleries a INNER JOIN (SELECT ps4_media_galleries.gallery_id,
min(ps4_media_galleries.gmedia_id) AS minID FROM ps4_media_galleries GROUP BY ps4_media_galleries.gallery_id) b ON a.gallery_id = b.gallery_id AND a.gmedia_id = b.minID
INNER JOIN ps4_media ON ps4_media.media_id = a.gmedia_id INNER JOIN ps4_folders ON ps4_folders.folder_id = ps4_media.folder_id
INNER JOIN ps4_galleries ON ps4_galleries.gallery_id = a.gallery_id
INNER JOIN ps4_media_iptc ON ps4_media_iptc.media_id = a.gmedia_id
ORDER BY ps4_galleries.created DESC
How do I get ps4_media.filename to be random, everything else is fine just want the thumbnail which ps4_media.filename is to be and of the records in the found set.