Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. SELECT p.*, group_concat( distinct c.color) as color, b.breeder_puppy_thumb , b.breeder_name
  2. FROM puppy_list p
  3. JOIN puppies_join_colors pjc ON p.ID = pjc.puppy_ID
  4. JOIN puppy_colors c ON c.ID = pjc.color_ID
  5. JOIN breeder_list b ON b.ID = p.puppy_breeder_id
  6. WHERE p.puppy_breed = :breedName
  7. GROUP BY p.ID
  8. ORDER BY p.price DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement