I currently have two tables I successfully perform keyword searches on. I now want to add a third table to the same query. Since I'm just an amatuer trying to solve someone elses mess, I having difficulty figuring this one out myself. This is what I have...
table 1: "Company" column 1: "CompanyID"
table 2: "Contact" column 1: "ContactID"
column 2: "ProductLines"
Original working query:
SELECT * FROM Company LEFT JOIN Contact on Company.CompanyID=Contact.ContactID
I wish to add a third table...
table 3: "ProductItems" column 1: "ProductLines"
column 2: "ProductItems"
The thing I'm having trouble with is how to nest these tables correctly. The reason for 3 separate tables is that each "Contact" carries many different "ProductItems" under many different "ProductLines", and, each "Contact" may serve more than one "Company". I already do keyword searches on companies and product lines, but I now want to add this third table to extend the same keyword search to the data in the product item fields.
I hope all this made sense.
table 1: "Company" column 1: "CompanyID"
table 2: "Contact" column 1: "ContactID"
column 2: "ProductLines"
Original working query:
SELECT * FROM Company LEFT JOIN Contact on Company.CompanyID=Contact.ContactID
I wish to add a third table...
table 3: "ProductItems" column 1: "ProductLines"
column 2: "ProductItems"
The thing I'm having trouble with is how to nest these tables correctly. The reason for 3 separate tables is that each "Contact" carries many different "ProductItems" under many different "ProductLines", and, each "Contact" may serve more than one "Company". I already do keyword searches on companies and product lines, but I now want to add this third table to extend the same keyword search to the data in the product item fields.
I hope all this made sense.