Reputation: 28
I have three tables
Each Product has multiple images but for homepage I want to display only one image for featured products.
This is the query I wrote but for products with 2 images it displays same product twice with different image. Any help?
mysqli_query($conn, "SELECT * FROM products a , featured_product b, image c WHERE b.p_id = a.product_id AND a.product_id = c.product_id ");
Upvotes: 0
Views: 32