I am using an Opencart shop for my online store, but the search engine looks only into the product names and description. I want to enhance the funcionality so it search the manufacterer too. But here is my problem:
The query opencart makes is the following:
SELECT p.product_id FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE ...
but there is no product_to_manufacturer table out there....there is just the manufacturers table! with all the manufacturers and their unique id.
The products table has a column called "manufacturer" that references his manufacturer id.
I have to enhance the query, I can't execute another query... is there a database guru who can help me out of this one??
FROM product p
JOIN product_description pd
ON pd.product_id = p.product_id
JOIN product_to_store p2s
ON p2s.product_id = p.product_id
JOIN manufacturers m
ON m.manufacturer_id = p.manufacturer