<?php$ID = clean($_GET['ID']);$ID = abs((int) ($ID));$max = $gamesonpage;$show = clean($_GET['page']);if(empty($show)){ $show = 1;}$limits = ($show - 1) * $max; $r = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' LIMIT '.$limits.','.$max.' ', $ID));$totalres = mysql_result($db->query('SELECT COUNT(ID) AS total FROM dd_games WHERE category=\''.$ID.'\''),0); $totalpages = ceil($totalres / $max); echo '<table width=\'100%\' border=\'0\' align=\'center\'> <tr> <td colspan=\'2\' class=\'header\'>'.clean($_GET['name']).' Games</td> </tr>';$count = 0;
<?php$ID = clean($_GET['ID']);$ID = abs((int) ($ID));$max = $gamesonpage;$show = clean($_GET['page']);if(empty($show)){$show = 1;}$limits = ($show - 1) * $max; $r = $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' ORDER BY dateadded DESC LIMIT '.$limits.','.$max.' ', $ID));$totalres = mysql_result($db->query('SELECT COUNT(ID) AS total FROM dd_games WHERE category=\''.$ID.'\''),0); $totalpages = ceil($totalres / $max); echo '<table width=\'100%\' border=\'0\' align=\'center\'><tr><td colspan=\'2\' class=\'header\'>'.clean($_GET['name']).' Games</td></tr>';$count = 0;