PHP – MySQL order by random

January 7th, 2008No Comments

To select random rows from mysql database table, you can use below query:

Here, I’m trying to select a random row from a table in a MySQL database.

Syntax:

SELECT * FROM table_name ORDER BY RAND()

Related Posts:

Tagged : ,

No Responses

Comments are closed.