i read elsewhere on internet that this is not a good database/table design. so i am ready to change that too, but i could not think of any other way to represent this relationship. a given product could have multiple tags, but i have to find - at a given time - only those products which have 'ALL' of multiple given tags.
the SQL suggested on the page is:
SELECT a.*FROM products a
INNERJOIN product_tags b ON a.product_id = b.product_id
WHERE b.tag_id IN(1,23,54)GROUPBY a.product_id