|
| |
|
|
SirLars
Posts: 1 Joined: 5/3/2006 Status: offline
|
Database results within a database results region?? - 5/3/2006 23:10:01
I am using front page to create a site with a database containing tables for teachers, classes and locations. (table information: teacher table: teacher_id, teacher_fname, teacher_lname, teacher_photolink, teacher_bio class_table: class_id, class_teacher_id, class_location_id, class description location_table: location_id, location_address, location_directions, location_maplink) Start with a drop down form that selects from the table of teachers. Comes to display that teacher's "bio page" I want to display all the classes that that teacher teaches... so I need to use a field in the teacher's table (teacher_id) to find the rows in the classes table with have that teachers id and give links to the description of those classes (i.e. select * from classes where class_table.class_teacher_id = teacher_table.teacher_id) On the display_classes.asp page shows the classes table row(s) with that teacher ID and has to show a link to the location of that class. (i.e. select * from locations where location_table.location_id = class_table.class_location_id ) The display_classes.asp page also has to display the link to the location page which will of course show the row from the location_table with that location_id . Trying to put the second database results inside of the database results gives me an error. namely: ---snip----- Courses from this instructor: ID=1 Database Results Error Description: No value given for one or more required parameters. Number: -2147217904 (0x80040E10) Source: Microsoft JET Database Engine ---snip---- I am embarrased to say i have simply gotten so rusty with my asp and sql. Should I be trying to create an sql statement that joins the databases? should I pass the class_id to a variable in the display_class.asp page and then use that variable to get the 2nd database results? (this is what I tried, --hence the ID=1 debugging trick-- but i don't think my SQL used it properly) or is there a proper way to show database results inside of another database results where the KEY for the second database results is a value from a field within the first? does this Make any sense?
|
|
|
|
rubyaim
Posts: 757 Joined: 6/22/2005 Status: offline
|
RE: Database results within a database results region?? - 5/4/2006 2:23:24
quote:
Trying to put the second database results inside of the database results gives me an error. Hi SirLars, how are you trying to do this? Would you be able to post the code for this page?
_____________________________
Sally
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|