View Single Post
Old 02-19-2013, 03:32 AM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,201
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Shoot, then you are making it *WAY* too hard!

Code:
SELECT 
    id
FROM 
    products 
    WHERE category_id = 3
    OR product_id IN ( 
        SELECT product_id 
        FROM products_extra_categories 
        WHERE category_id = 3 )
ORDER BY id
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote
Users who have thanked Old Pedant for this post:
Taipan (02-19-2013)