Answer the question
In order to leave comments, you need to log in
Need help, many-to-many?
How to display specific images by id_img:
product table:
id title id_img
1 Nike 1,2,3
2 Puma 1,2
3 Lux 3,4,5
id img
1 1.png
2 2.png
3 3.png
$products= \R::getAll("SELECT * FROM product_status JOIN product ON product.status_id = product_status.id JOIN pay ON product.paysystem_id = pay.pay_id");
Answer the question
In order to leave comments, you need to log in
Products
----------------
id title
1 Nike
2 Puma
3 Lux
Images
--------------
1 1.jpg
2 2.jpg
3 3.png
pivotProductsImages
----------------
1 1
1 2
2 1
2 3
3 2
3 1
3 3
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question