I was just wondering if this is the most efficient way to use categories:
---------------------------------
| ID | ITEM | CATEGORY |
---------------------------------
| 1 | COOKIES | FOOD |
| 2 | CAKE | FOOD |
| 3 | WATER | DRINK |
| 4 | PEANUTS | FOOD |
| 5 | PEPSI | DRINK |
---------------------------------
↑ int ↑ text ↑ text <- [ type of column ]
Then my query is:
SELECT * FROM `table` WHERE category='FOOD';