>From the German php FAQ:
version >= 3.23
SELECT * FROM tabelle ORDER BY RAND() LIMIT 1
version < 3.23
//see how many rows you have
$result = @mysql_query("SELECT COUNT(*) FROM $table");
$row = mysql_fetch_row($result);
//produce random number out of that
mt_srand((double)microtime()*100)
>From the German php FAQ:
version >= 3.23
SELECT * FROM tabelle ORDER BY RAND() LIMIT 1
version < 3.23
//see how many rows you have
$result = @mysql_query("SELECT COUNT(*) FROM $table");
$row = mysql_fetch_row($result);
//produce random number out of that
mt_srand((double)microtime()*100)