mysql question
| From: | Donahue Ben | Date: | Sun, 20 Oct 2002 17:54:07 +0000 |
| Subject: | mysql question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120675@lists.php.net to get a copy of this message | ||
I have some images in my database, and they are put
into certain categories. So what i have in my
database is a table called images and a table called
categories. My question is I want to retrieve images
by selected categories the user chooses. So if there
are a total of five categories, the user chooses two
categories to views images, it will select those
images only by the two categories the user selected.
How can I do this with just submitting one query
instead of submitting two queries? In both the image
table and category table there is a unique id. So the
image in the image table can reference the category in
the category table.
Ben D.
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/