I'm trying to get results back from an sql query in the easiest way to handle in my script.
table 'categories' and table 'restcat' (restaurant categories).
I'd like to construct a query where I can look up a specific restaurant id, yet somehow related it to the categories table so that instead of a regular select/where, I get back something like:
Showing in this fashion that restaurant 136 is a member of the Italian and Pizza categories.
(and yes, my categories table actually uses category numbers) --
Andy
table 'categories' and table 'restcat' (restaurant categories).
I'd like to construct a query where I can look up a specific restaurant id, yet somehow related it to the categories table so that instead of a regular select/where, I get back something like:
Code:
+------------+----------+----------+
| restaurant | category | category |
+------------+----------+----------+
| 136 | Chinese | NULL |
| 136 | French | NULL |
| 136 | Italian | Italian |
| 136 | Pizza | Pizza |
| 136 | Seafood | NULL |
+------------+----------+----------+
Showing in this fashion that restaurant 136 is a member of the Italian and Pizza categories.
(and yes, my categories table actually uses category numbers) --
Andy