Autor Zpráva
Paja
Profil *
Zdravím

co je na tomhle dotaz špatně?


SQL=SELECT a.id, a.title, a.hits, a.created_by, a.created_by_alias, a.created AS created, a.access, u.name AS author, a.state, g.name AS groups, COUNT(ako.contentid) AS contentid FROM sil_content AS a LEFT JOIN sil_akocomment AS ako ON ako.contentid = a.id LEFT JOIN sil_users AS u ON u.id = a.created_by LEFT JOIN sil_groups AS g ON a.access = g.id WHERE a.catid='3' AND a.state='1' AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2007-01-25 19:08:26' ) AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2007-01-25 19:08:26' ) AND a.access<='0' AND '0'<='0' ORDER BY a.ordering LIMIT 0, 50


erro hlásí toto:



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 'contentid) AS contentid FROM sil_content AS a LEFT JOIN sil_akocomment AS ako ON ako.c' at line 1


ale moudrý z toho vůbec nejsem .-(
Kajman_
Profil *
Nechybí tam group by, když používáte count?
Paja
Profil *
jo to je ono díky :-) teda člověk zapomíná když to dýl nedělá ...
Toto téma je uzamčeno. Odpověď nelze zaslat.