
02-20-2006, 03:39 AM
|
|
SEO Junior
|
|
Join Date: Feb 2006
Posts: 6
|
|
I think this should do the trick...
PHP Code:
<p><font size="1">
<?
$sql2 = "SELECT * FROM games where category = 'Movies' ORDER BY played DESC LIMIT 0,10";
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)) {
?>
<a href="game.php?gameid=<? echo $row2["gameid"]; ?>">
<? echo $row2["name"]; ?>
</a><br>
<?
}
?>
<?
$sql2 = "SELECT sum(played) as count FROM games where category = 'Movies' ";
$result2 = mysql_query($sql2);
$row2 = mysql_fetch_array($result2);
$totalplayed = $row2["count"];
?></font></p></div>
I've not tested it - but it should work
Monkiman
|