'0') { $ww = $w+1; $meta_title_end = " - page $_REQUEST[w]"; } $incsub2 = 2; } //============================================================================ $topsql_sg = "SELECT SUM(voteup) AS `vtup`, SUM(votedown) AS `vtdown` FROM `games` WHERE `cat_url` = '$cat_url' GROUP BY `cat_url` LIMIT 0,1"; $topresult_sg = mysql_query($topsql_sg) or die('Error, query failed ' . mysql_error()); $toprow_sg = mysql_fetch_array($topresult_sg); $voteup_sg = $toprow_sg['vtup']; $votedown_sg = $toprow_sg['vtdown']; $total_sg = $voteup_sg + $votedown_sg; if($voteup_sg > 0) { $percenteach = ($voteup_sg/$total_sg) * 5; $rate_sg = round($percenteach, 0); }else{ $rate_sg = "0"; } //============================================================================= ?> <?=$rowmeta['cat_title'];?><?=$canoni;?><?=$meta_title_end;?>
"; } ?>