i have two tables: product and productVariation: product variation table contains multiple entries for the same product but with different attributes.
example: product: id name 1 top 2 bottom
so for the above tables, when I am querying that data for the products list to display, let’s say the user wants data for size_id 7 then we have 3 possibilities (3 different colors) but on the products list page, I just want to show one entry for this product. My question is how can I just get one entry based on the product_id from the product variation table. I already wrote a query that is filtering the data based on color and size but I get multiple entries for the same product, I just want one of these rows.
Thank you! 🙂