View Single Post
Old 06-23-2008, 06:16 AM  
Naughty
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,482
Quote:
Originally Posted by k0nr4d View Post
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'
AND p2c.categories_id = '<category id number goes here>'
LIMIT 4
Thanks, but i need more help then ;)
You added just this right??
AND p2c.categories_id = '<category id number goes here>'

Is there a way to get this cid number in this same query?
As you could see, this is also in the categories_stores table.

Do we need a small query first to get these category ID's, or is that double-up?
__________________
seks.ai for sale - ping me
Naughty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote