Lo all, What's the format for a sub query in MySQL??
I've tried the below with a few variants but I can't seem to get it sorted... SELECT songlist.ID AS ID, songlist.duration AS Duration, songlist.artist AS Artist, songlist.title AS Title, songlist.filename AS FileName FROM songlist LEFT JOIN categorylist ON songlist.ID=categorylist.songID WHERE categorylist.categoryID=(SELECT category.ID FROM category WHERE category.parentID='4' ORDER BY RAND() LIMIT 1) ORDER BY songlist.filename; This is a InnoDB Table, running on 4.0.14... Thanks, me -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]