function outputscores($mysqlquery,$reverse=false)
{
while($row = mysql_fetch_array($mysqlquery))
{
echo '<img src="img/date.png" /> ' . date("j M Y",strtotime($row['timestamp'])) . '
<img src="img/time.png" /> ' . date("H:i:s",strtotime($row['timestamp'])) . '
<img src="img/star.png" /> '.$row['score'].$_GET["scoretype"].'<br />';
}
}
I need to reverse the array if $reverse is set to true, but PHP says that the mysql_fetch_array
's output is not a valid array. Neither is $mysqlquery itself.
Is there any help?
Wow I've asked so many questions today ._.
EDIT
$result = mysql_query("SELECT * FROM $gid LIMIT 25") or throwerror(mysql_error());
outputscores($result);
EDIT2 Another possible call:
$result = mysql_query("SELECT * FROM ".$gid.",users WHERE users.lastcheck < ".$gid.".timestamp") or throwerror(mysql_error());
outputscores($result);