$result = dbquery("SELECT a.*, (SELECT AVG(rating_vote) FROM ".$db_prefix."ratings r WHERE r.rating_type='A' AND (r.rating_item_id = a.article_id)) as 'ratcount' FROM ".$db_prefix."articles a ORDER BY ratcount DESC LIMIT 20 "); openside("
TOP 20"); echo""; while ($data = dbarray($result)) { echo ""; } echo"
OCENA
AKADEMIK
"; echo round($data['ratcount'],2)."
".trimlink($data['article_subject'], 150)."
"; closeside();