私は充填クエリを持っています:
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
ps4_media.filename をランダムに取得するにはどうすればよいですか。それ以外はすべて問題なく、ps4_media.filename のサムネイルと対象セット内のレコードが必要です。