mysql find_in_set Únete
SELECT table_categories.name, count(table_products.id)
FROM
table_categories LEFT JOIN products
ON FIND_IN_SET(table_categories.id, products.cid)
GROUP BY table_categories.name
Trevorpergliamici