Hi.

I have the following test db/tbl setup. 

stateTBL
+--------------+
| stateName    |
| stateID      |>>>>>>>+
+--------------+       V
                       V
                       V
collegeTBL             V
+--------------+       V
| collegeName  |       V
| stateID      |<<<<<<<+
| collegeID    |>>>>>>>+
+--------------+       V
                       V
                       V
deptTBL                V
+--------------+       V
| deptName     |       V
| collegeID    |<<<<<<<+
| deptID       |>>>>>>>+
+--------------+       V
                       V
                       V
courseTBL              V
+--------------+       V
| courseName   |       V
| deptID       |<<<<<<<+
| courseID     |>>>>>>>+
+--------------+       V
                       V
                       V
facultyTBL             V
+--------------+       V
| facultyName  |       V
| courseID     |<<<<<<<+
| ID           |
+--------------+


my intended app will allow the user to select a given
 item (college, dept, course, faculty) and to store
 this data. when a user is displaying a list of
 items, i'd like to have my app determine if the
 child of the item has been selected by the user.

so. if a user has selected stanford, i'd like to
 be able to have a query that returns 'true' for
 any item, that has a 'child' (leaf) already selected by
 the user. (this should work for any level of
 childTBL)

so if a user has selected a course, from the 
 stanford, physics dept, physics 101, i'd like to 
 have a query that returns 'true' if the user 
 selects 'stanford' from the list of colleges...

i can't quite seem to figure out the sql to make it happen...

thoughts/comments/etc..


i'm hoping that this makes sense!!

thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to