I have a bit of trouble on my hands. I am constructing a blog using PHP and PostGreSQL. I need to be able to call out the articles with the usernames and the number of comments for each article. Now, the articles and username I can do no problem, but the number of comments is making me mad (not really, but I can't think of a better word).
Right now, my SQL looks like:
The Error I get is: ERROR: Attribute greenblogger_users.username must be GROUPed or used in an aggregate function.PHP Code:
WHERE greenblogger_articles.uid = greenblogger_users.uid
AND greenblogger_articles.nid = greenblogger_comments.nid;
I've tried grouping it, but it doesn't work.