I have two tables. products and productgroups. I use
"SELECT * FROM `product` `t`
WHERE (name LIKE %test% OR ean LIKE %test% )
AND closed=0 "
To search in products. Now I have another table called productgroups
. Every product has its own productgroup_id
. I need to show only those products that have their productgroup_id.closed=0
.
If productgroup.closed = 1
it shouldn t display it.
我如何这样做?