I got 3 tables, products, categories, categories_products (pivot). Each product belongs to one or more category. How can I show products under a specific category
a raw SQL example would be
SELECT *
FROM categories_products
INNER JOIN products ON categories_products.product_id = products.id
INNER JOIN categories ON categories_products.category_id = categories.id
AND categories.category_name = 'desks'
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire