$result = dbquery("SELECT a.*, (SELECT AVG(rating_vote) FROM ".$db_prefix."ratings r WHERE r.rating_type='C' AND (r.rating_item_id = a.page_id)) as `ratcount` FROM ".$db_prefix."custom_pages a ORDER BY ratcount DESC LIMIT 10 "); openside("top10"); echo"
"; echo round($data[ratcount],2)." | ".trimlink($data['page_title'], 30)." |