HELP - With arrays and mysql select
Posted: Sun Feb 28, 2010 1:37 am
Hi everyone,
My PHP skills are not good enough to figure out this obstacle. I would like to make a page that shows me data from 4 different mysql tables, and i have been playing around with MYSQL Join but there must be an easier way of doing this. so if people dont mind posting their ideas and advise. Would be forever greatful if i can learn something new...
Page to be shown:
Vendor name 1:
- Product 1 (Engineer1, Engineer2, Engineer3)
- Product 2 (Enginner2, Engineer3
- Product 3 (Engineer1, Engineer3)
Vendor name 2:
- Product 4 (Engineer1, Engineer2, Engineer3)
- Product 5 (Enginner2, Engineer3
- Product 6 (Engineer1, Engineer3)
So list all the Vendors and in between the vendors list all the products for that vendor. Then i need to put in what engineers can do the specific products. I have been looking at using MySQL JOIN but then not sure how i would make my php script to recognize that vendorname should be bold, and then in between the vendors how does it know to put the products that belong to that vendor.
My MySQL tables are as this:
VENDOR TABLE:
id, vendName, vendID
********************************
1, McAfeee, mcafeee
PRODUCT TABLE:
id, prodName, prodID, vendID
*************************************
1, Web Gateway, webgateway, mcafee
PRODUCTSKILLS TABLE:
id, prodID, userID, vendID
*************************************
1, webgateway, johndoe, mcafee
PEOPLE TABLE:
id, engineerName, engineerID
*************************************
1, John Doe, johndoe
As you can see i have tried to tie everything in to eachother, but now i just need the final help.
THANK YOU SO MUCH FOR THEM WHO CAN HELP ME !!
Regards
Rippie
My PHP skills are not good enough to figure out this obstacle. I would like to make a page that shows me data from 4 different mysql tables, and i have been playing around with MYSQL Join but there must be an easier way of doing this. so if people dont mind posting their ideas and advise. Would be forever greatful if i can learn something new...
Page to be shown:
Vendor name 1:
- Product 1 (Engineer1, Engineer2, Engineer3)
- Product 2 (Enginner2, Engineer3
- Product 3 (Engineer1, Engineer3)
Vendor name 2:
- Product 4 (Engineer1, Engineer2, Engineer3)
- Product 5 (Enginner2, Engineer3
- Product 6 (Engineer1, Engineer3)
So list all the Vendors and in between the vendors list all the products for that vendor. Then i need to put in what engineers can do the specific products. I have been looking at using MySQL JOIN but then not sure how i would make my php script to recognize that vendorname should be bold, and then in between the vendors how does it know to put the products that belong to that vendor.
My MySQL tables are as this:
VENDOR TABLE:
id, vendName, vendID
********************************
1, McAfeee, mcafeee
PRODUCT TABLE:
id, prodName, prodID, vendID
*************************************
1, Web Gateway, webgateway, mcafee
PRODUCTSKILLS TABLE:
id, prodID, userID, vendID
*************************************
1, webgateway, johndoe, mcafee
PEOPLE TABLE:
id, engineerName, engineerID
*************************************
1, John Doe, johndoe
As you can see i have tried to tie everything in to eachother, but now i just need the final help.
THANK YOU SO MUCH FOR THEM WHO CAN HELP ME !!
Regards
Rippie