is it possible to randomize the order of a query?
i want to use this to display a random entry of a table
here is the query i want to randomize
$f5 = "$bbuserinfo[field5]";
[B]$query = "SELECT * FROM quebec_userfield WHERE field5='$f5' ORDER BY userid DESC";[/B]
$res = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($res)) {
$id = $row["userid"];
$query = "SELECT username, userid FROM quebec_user WHERE userid=$id ORDER BY userid DESC";
$res = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($res)) {
$nom = $row["username"];
echo "<a href=\"member.php?username=$nom\">";
echo $nom;
echo "</a><br>";
}
}