This topic is locked

Add data from one table to another

11/5/2006 3:48:10 AM
PHPRunner General questions
G
gdude66 author

Hi,

I have one master table

event with fields

id

staffid

studentid

yearlev

topic

eventdes
another table - student

idstudent

name

level

group
another table - staff

idstaff

name

staffgroup
If I want to add an event to the events table and then pass not only 'student'.'studentid' to 'event'.'idstudent' which I have done with a lookup but also 'student'.'level' to 'event'.'yearlev' after selecting the student name/id how would I accomplish that? Basically after I select the student from the lookup I want to pass their year to 'event'.yearlev' as the same number (from 0 - 12)

T
thesofa 11/5/2006

one of the available events is adding data to another table.

I assume you have tried using the events from the PHPR listss in the help files?????

J
Jane 11/7/2006

Graeme,
you can use dependent dropdown boxes for this purpose.
Choose Lookup wizard for the yearlev field and set up all required settings.

Then check off This dropdown is dependent on ... option and select studentid in the Category control and idstudent in the Category field dropdown boxes on the "Edit as" settings dialog.
Here is a "How to setup dependent dropdown boxes on Edit/Add pages" tutorial:

http://www.xlinesoft.com/phprunner/php-database.htm

G
gdude66 author 11/7/2006

Graeme,

you can use dependent dropdown boxes for this purpose.
Choose Lookup wizard for the yearlev field and set up all required settings.

Then check off This dropdown is dependent on ... option and select studentid in the Category control and idstudent in the Category field dropdown boxes on the "Edit as" settings dialog.
Here is a "How to setup dependent dropdown boxes on Edit/Add pages" tutorial:

http://www.xlinesoft.com/phprunner/php-database.htm



Thanks Jane - got htis to work a couple of days ago - should have resolved the issue then.