Is there a better way to get a random record with limit 1
I am using the below Query
$r = mysql_query("SELECT username FROM user ORDER BY RAND() LIMIT 1");
but this creates a terrible bottleneck to me. Is there a better option to do this.
Aucun commentaire:
Enregistrer un commentaire