'0') { $meta_title_end = " - page $_REQUEST[c]"; } //============================================================================ $topsql_sg = "SELECT SUM(voteup) AS `vtup`, SUM(votedown) AS `vtdown` FROM `games` WHERE `sub_cat_url` = '$sub_cat_url' GROUP BY `sub_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['sub_cat_title'];?><?=$canoni;?><?=$meta_title_end;?>
"; } ?>