MySQL problems
I have a query:
SELECT COUNT(user_journal_comments.journal_id) AS num_com, user_journal.user_id, user_buddies.id FROM user_journal, user_buddies, user_journal_comments WHERE user_buddies.user_id = 8 AND user_journal.user_id = user_buddies.buddy_id AND user_journal_comments.journal_id = user_journal.entry_id GROUP BY user_journal.entry_id
Now my problem is this will select only entries with comments, or user_journal_comments.journal_id = user_journal.entry_id but I want it to select all entries wheither their are comments associated with that entry or not. Any suggestions? This might not be as clear as can be, but I'm not sure how else to put it.
SELECT COUNT(user_journal_comments.journal_id) AS num_com, user_journal.user_id, user_buddies.id FROM user_journal, user_buddies, user_journal_comments WHERE user_buddies.user_id = 8 AND user_journal.user_id = user_buddies.buddy_id AND user_journal_comments.journal_id = user_journal.entry_id GROUP BY user_journal.entry_id
Now my problem is this will select only entries with comments, or user_journal_comments.journal_id = user_journal.entry_id but I want it to select all entries wheither their are comments associated with that entry or not. Any suggestions? This might not be as clear as can be, but I'm not sure how else to put it.
