I have a few tables (osc)
Code:
This is important:
cs.categories_storename = 'name.co.uk'
Right now, i get all products from any category, this is not supposed to happen. Does anybody have a clue what is wrong with our query? We tried to fix it by adding a line one by one, no dice
If you need any more info, please ask or ping me on icq 125586484 / msn inpresif/@/hotmail . com
Code:
SELECT cs.categories_storename,cs.categories_id,c.categories_id,c.parent_id,p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, pd.products_description,
IF (
s.status, s.specials_new_products_price, NULL
) AS specials_new_products_price, p.products_date_added, m.manufacturers_name
FROM products p, categories c, products_to_categories p2c
LEFT JOIN manufacturers m ON p.manufacturers_id = m.manufacturers_id
LEFT JOIN products_description pd ON p.products_id = pd.products_id
LEFT JOIN categories_stores cs ON c.parent_id = cs.categories_id
LEFT JOIN specials s ON p.products_id = s.products_id
WHERE c.categories_status = 1
AND cs.categories_storename = 'name.co.uk'
AND products_status = '1'
AND c.categories_id = p2c.categories_id
AND pd.language_id = '4'
LIMIT 4