article displaying
| From: | Gerry Chu | Date: | Fri, 22 Dec 2000 20:12:44 +0000 |
| Subject: | article displaying | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31621@lists.php.net to get a copy of this message | ||
I'm trying to display articles. Each article can have multiple authors.
So in mySQL, I have these tables:
_news_
news_id
title
article
submit_time
_members_news_
news_id
member_id
_members_
member_id
member_name
e-mail
Ok, so I have a loop fetching news articles. I could have a query that
returns:
title
article
submit_time
member_name
e-mail
But wait! If more than 1 member wrote the article, then the article would
appear once for every member who wrote it!
So I could just get a seperate query returning just member_ids and e-mails
for each article, but that would be a bottleneck, wouldn't it be, if for
every article another query had to be executed?
What should I do? Is there a better way to do it?
Thanks,
Gerry