| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Oct 2004
Location: Chester
Posts: 364
|
Sample Application
Hi, I am a bit of a newbie here, so please bear with me. I am trying to develop a sample application for a restaurant. I have two tables in my database: menuType menu menuType has 2 fields id_type(pk) title_type menu has 5 fields id_menu(pk) idtype_menu(fk) title_menu description_menu price_menu Ok, so in Dreamweaver I have managed to display my menu types in the index page: starters mains desserts In my menu.php page I want to be able to dynamically display the starters or whatever I select from the index.php. Ok, so far this is working, apart from when I try to dynamically load in the starters etc... Here is the sql query that I use to define my record set in the menu.php page: SELECT * FROM menu INNER JOIN menuType ON idtype_menu = id_type WHERE idtype_menu = colname And in the variables box I have: Name Default Value Run-time Value colname 1 $_GET['idtype_menu'] Any suggestions to how I can get this to work. If someone is interested in helping me, I can email the files so you can see more clearly what I am getting at. Many thanks in advance. Nick |
|
|
|
|
|
#2 (permalink) |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,206
|
OK so for instance you want to click starters on index.php and be taken to a list of all the starters in menu.php? right? No need for the INNER JOIN. Code:
colname is the menu type's id. That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
![]() |