it gives an error on the "while" line...any ideas? my select is correct, because if i do "echo $num-5", itll return the correct numberPHP Code:$num = mysql_num_rows(mysql_query("SELECT * FROM reviews"));
//echo $num-5;
if(($num-5)<=0){
$sql = "SELECT * FROM reviews LIMIT $num";
}
else{
$sql = "SELECT * FROM reviews LIMIT $num-5, 5";
}
$result = mysql_query($sql);
while ($rrow = mysql_fetch_array($rresult)) {
printf("<li><a href=\"viewreview.php?id=%s&sys=%s\">%s</a></li>", $row['id'], $row['system'], $row['gamename']);
}




Reply With Quote