I am rolling my own functionality for a well known cart. Here is my query:
SELECT d.product, d.product_id, p.price FROM cscart_product_descriptions AS d, cscart_product_prices AS p WHERE d.product_id IN (
SELECT product_id FROM cscart_products WHERE product_code IN (
SELECT product_id FROM cscart_range WHERE range_name IN (
SELECT range_name FROM cscart_range WHERE product_id = '0140885'
)))
When I remove the product_prices related selection from the first select, I get three items returned as expected. When I run it with the prices included, I get something like 4,500 results.
I am aware that this is a joining issue, I’m just not certain how to correct it.
Cheers!
Its doing a cross join with cscart_product_prices table..
you could try something like this: