Axel Richter: SELECT und COUNT aus verschiedenen tabellen in einer query

Beitrag lesen

Hallo,

SELECT c.COUNT(id) AS comments, t.title

^Welches DBMS kann das denn? Ich würde COUNT(c.id) schreiben.

FROM comments c inner join title t

ON c.cat = t.cat AND c.ucat = t.ucat

WHERE cat='".$cat."' AND ucat='".$ucat."'");

ERROR 1140: Mixing of GROUP columns (MIN(),MAX(),COUNT()...)
with no GROUP columns is illegal if there is no GROUP BY clause.

Mal in die Handbücher schauen?
http://www.mysql.com/doc/en/Counting_rows.html

viele Grüße

Axel