Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.94 KB | None | 0 0
  1. SELECT p.productId,
  2. p.productName,
  3. p.productDescription,
  4. pc.categoryName AS productCategory,
  5. pt.typeName AS productType,
  6. p.productPrice,
  7. pg.gemstoneName AS productGemstone,
  8. pm.materialName AS productMaterial,
  9. p.productWeight,
  10. pi.imageName AS productImageName,
  11. pgg.genderName AS productGender
  12. FROM product p INNER JOIN productcategory pc ON pc.categoryId = p.productCategory
  13. INNER JOIN productgemstone pg ON pg.gemstoneId = p.productGemstone
  14. INNER JOIN productType pt ON pt.typeId = p.productType
  15. INNER JOIN productmaterial pm ON pm.materialId = p.productMaterial
  16. INNER JOIN product_images pi ON pi.productId = p.productId
  17. INNER JOIN productgender pgg ON pgg.genderId = p.productGender
  18. INNER JOIN product_ringsize prs ON prs.productId = p.productId
  19. INNER JOIN product_chainssize pcs ON pcs.productId = p.productId
  20. LEFT JOIN product_pendantsize pps ON pps.productId = p.productId
  21. WHERE pc.categoryLink = 'pendant' AND pi.imageRole ='main';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement