I have a MySQL database table that stores the URLs of photos. I need to pull 5 random records from a database of a specific type. I can pull 5 records:
SELECT Photos.* FROM Photos WHERE Photos.Type_ID = 4 LIMIT 5
Now I need help trying to figure out how to retrieve different records each time. How can I get random rows from this result set?
Andrew
source share