Guest User

Untitled

a guest
Jun 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.48 KB | None | 0 0
  1. select places.*, group_concat(category_name) from places
  2.  
  3. left join category_place
  4. on category_place.place_id = places.id
  5.  
  6. left join category
  7. on category.id = category_place.category_id
  8.  
  9. where category.name like '%something%'
  10.  
  11. //Problem: I need to select all the places that match certain category criteria, but i need to return, along //with the results, all the categories that place has, but with the where clause, its just returning the //'%something%' category, not the other ones
Add Comment
Please, Sign In to add comment