Quote:
|
Originally Posted by chatserv
Code:
<?
if (eregi("block-Cheats.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
ob_start();
global $prefix, $dbi;
include("modules/Cheats/config.php");
$latest = "SELECT * FROM ".$prefix."_cheats DESC LIMIT 5";
$latest = sql_query($latest, $dbi);
$count = sql_num_rows($latest, $dbi);
$content = "5 Latest Cheats
";
While ($show = sql_fetch_array($latest, $dbi)){
$cname = $show['cheat_game'];
$cheat = $show['cheat_cheat'];
$cheat = "$cheat[0]$cheat[1]$cheat[2]$cheat[3]$cheat[4]";
$content .= "$cheat - $cname
";
}
$content .= "We have $count cheats";
ob_end_clean();
?>
|
the
Code:
$count = sql_num_rows($latest, $dbi);
is useless because he limits his query to 5.
and using $dbi is old and FB said to start using the new db layer.
:wink: