Comments and table join
| From: | JJ Harrison | Date: | Sun, 18 Aug 2002 04:47:58 +0000 |
| Subject: | Comments and table join | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21204@lists.php.net to get a copy of this message | ||
I have this query:
select avg(article_comment.vote) as avg, article_data.aid,
article_data.time, article_data.name, article_data.description from
article_data, article_comment where article_comment.aid = article_data.aid
AND released > 1 GROUP BY article_data.aid order by time desc
One table has article data. The other has article comments (which include a
rating).
With this query it only returns articles with comments. How can I get it to
return all of them? (and return 0 as avg if there are no comments)
I am really stuck here.
--
JJ Harrison
webmaster@tececo.com
www.tececo.com
--
Please reply on the list/newsgroup unless the reply it OT.