Looking for a little MySQL help as well
| From: | Phillip Baker | Date: | Mon, 12 Jul 2010 17:53:57 +0000 |
| Subject: | Looking for a little MySQL help as well | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306835@lists.php.net to get a copy of this message | ||
Hey All,
I am looking for a little MySQL Query help as well.
I am not getting any response form the MySQl Email list to my query.
And knowing there are some SQL wizards on this list I thought I would as for
help as well.
I have one table with products that many have one or more categories.
I am using an index table and am having trouble getting a proper result set.
Table 1
Product_id | Product_Name
1 | Product A
2 | Product B
3 | Product C
Table 2
Category_id | Category_Name
1 | Admin
2 | Marketing
3 | Support
4 | IT
Table 3
Product_id | Category_id
1 | 1
1 | 3
2 | 2
3 | 3
3 | 4
Result would look like
Product A, Admin, Support
Product B, Marketing
Product C, Support, IT
I believe this is a one to many using an index table?
I appreciate any help.
Thanks.
Blessed Be
Phillip
If you try to protect idiots from themselves, even if you succeed, you just
wind up filling the world with idiots.
- - Doug Casey