Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Gugio klausimai

Parašė Gugiss· 2008 Rugs. 29 14:09:57
#82

KAs blogai:
Klaida:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN fusion_custom_pages ON rating_item_id = page_id ORDER BY rating_vote D' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN fusion_custom_pages ON rating_item_id = page_id ORDER BY rating_vote D' at line 1


Kodas:
openside("Gera");
$result = dbquery("SELECT * FROM ".$db_prefix."ratings WHERE rating_type='C' LEFT JOIN ".$db_prefix."custom_pages ON rating_item_id = page_id ORDER BY rating_vote DESC LIMIT 0,5");
while ($data = dbarray($result)) {
$id = $data['rating_item_id'];
$rating = $data['rating_vote'];
   echo "$id $rating<br>";
}

closeside();