My script keeps causing a timeout by taking longer than 30 seconds, basicly it should access the database and get all the games (which is about 14) and list all the ones with a rating above 4 (which is 1) as you can see here its all goes strange, heres the code:
PHP:
while($i < $num){
$totalrat = mysql_result($results,$i,"totalrat");
$rats = mysql_result($results,$i,"rats");
$name = mysql_result($results,$i,"name1");
if($totalrat/$rats > 4){
echo '<a href = "Games/'.$name.'.php"><img src="Games/'.$name.'.gif" width="50" height="50" border="0"></a></br>';
}
}













