MySql mutliple tables
- by Chris Harrison
I've been looking into JOIN, subqueries and other ways of doing this, but I can't work out the best way to do this is...
I have a table (ps_category_product):
id_product, id_category
I want to perform a query on it like:
SELECT id_product FROM ps_category_product WHERE id_category='$this_cat'
BUT, I only want to perform this query where the ID's are returned by a query on another table (ps_product):
id_product, active
SELECT id_product FROM ps_product WHERE active='1'
Can anyone help me with getting these two queries working together?