Thanks for the quick reply!
Yeah, that's exactly what I tried earlier. But for some reason, it didn't work as expected. I kept getting an error next to the GROUP BY part.
Here's what my query looks like:
SELECT SQL_CALC_FOUND_ROWS wb_entries.*, wb_categories.cat_name,
wb_groups.*, count(wb_comments.id),
UNIX_TIMESTAMP(e_date_created) as e_date_created_timestamp
FROM wb_entries
LEFT JOIN wb_categories ON wb_entries.e_category = wb_categories.id
LEFT JOIN wb_groups ON wb_entries.e_group = wb_groups.id
LEFT JOIN wb_comments ON wb_comments.c_comment_on_entry = wb_entries.id
WHERE e_author = 2 AND e_privacy_level = 1
ORDER BY e_date_created
GROUP BY wb_comments.c_comment_on_entry
DESC LIMIT 0, 10
And here is the error message:
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 wb_comments.c_comment_on_entry DESC LIMIT 0, 10' at line 1
Any idea?