I am writing app, and I have three tables (places,
categoriesand
main_categories`).
Main categories
are array of list of categories ids (like main category "Sport" can have "Football stadiums" and "pools"). I am trying to ask the backend for places from main category. I have problem, because places can also have multiple categories, so I have records like this :
Main categories table :
| main_category | categories |
| ------------- | ---------- |
| sport | 1,3,7,8 |
places table :
| place_name | categories |
| ---------------- | ---------- |
| xxx team statium | 1,8,11 |
How can I display in MySQL places with in main_category list?
For example above sport should show all places with categories 1,3,7 and 8.