Invalid query: 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 'GROUP BY blog.id
ORDER BY blog.datum DESC
LIMIT 10' at line 9
Whole query: SELECT
blog.id,
blog.titel,
count(blog_reply.id) as br
FROM blog
JOIN users ON (users.id = blog.owner)
LEFT JOIN blog_reply on (blog_reply.bid = blog.id AND blog_reply.publish = 'yes')
WHERE owner =
GROUP BY blog.id
ORDER BY blog.datum DESC
LIMIT 10