Best unofficial Apache Server developers community |
|
I have a MySQL database table that stores the URLs of photos. I need to pull 5 random records from the database of a particular type. I can pull 5 records like this:
Now I need help trying to figure out how to pull different records every time. How can I retrieve random rows from this result set?
posted via StackOverflow
|
|
 
|
You can use |
|
 
|
|
|
 
|
Google points to this detailed page. Looks like it works. I am sure it can't ensure distinct record each time, but worth trying. http://akinas.com/pages/en/blog/mysql_random_row/ |