mysql_query("SELECT * FROM nume_tabela WHERE camp='valoare' ORDER BY rand() LIMIT 10")

Select random records from a MySQL table
Learning Journal - Random Rows in MySQL
Selecting random record from MySQL database table. ~ Blog ~ Akinas