RDBMS: MySQL
I'm designing an online store and need some assistance in displaying the products for a category page. Say there are 100 products and each product has 1-3 images.
I need to display all products, but also multiple images per product. I'm having trouble in finding a way to display it correctly.
Database schema:
I can retrieve the data as an array and loop through it but if I join the tables with all of the images I'm going to have duplicate rows retrieved with different images in each. I'm having trouble understanding how I would display multiple images for every product when viewing all products.
Let me know if you'd like me to elaborate further. Thanks in advance!