Originally Posted by
ToddW
There's a better way.
You need these tables.
Categories
id | category_name | category_description |
Then create a table called rest_cats like:
cat_id | rest_id
Then make a new row for each category a restaurant is in.
Then when you do lookups you do joins.
Your way requires more overhead when doing queries and really slows it down, and is basically the wrong way to do it. Google database normalization, there may be even more data you can split into another table(s) to make it faster, easier to work with, and easier to edit in the future.
-Todd
Bookmarks