I have tried left join, inner join, join and nested select queries but it is always giving me one result set even though table A has multiple comma separated values.
The simplest solution which i could figure was query twice which gives me the result, if i query the product_ids from table A and then based on the result query table B. Where product_ids has multiple comma separated values.
How could i make a single query like this one?
SELECT *
FROM `sys_products`
WHERE id IN (
SELECT sys_cart.product_ids
FROM `sys_cart`
WHERE userid = 2
)
Why won't this query work? The FIND_IN_SET also does not work.