I have a problem with my mysql query
SELECT pics.*, pic_comments.*, count(*) AS num_comments FROM pics, pic_comments WHERE pics.category = 1 AND pics.id = pic_comments.pic_id GROUP BY pic_comments.pic_id;
pics table: | id | submitter | time | date | category |
pic_comments table: | pic_id | comment |
The problem is that i only get the the pictures that have comments, i want even the pictures where there arent no comments and the field num_comments should be 0.
Someone who have an idea to solve this?
_________________________________________________________________ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php