Looking for a little MySQL help as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux