Hi there, I've been hunting thru the net trying to find some info on
inserting data to multiple tables.
I have two tables (LookupTable and MainTable):
Once I insert data into the MainTable I want to also insert the ID from the
MainTable to the LookupTable as the FirstID. Then I want to check for the
highest ID number in the SecondID field that is associated with the First ID
then add one to the highest value and insert that to the SecondID.
In the above table I would want to insert 1 to the FirstID then find the
highest number in the SecondID associated with the FirstID "1" then add one
to it so that my next row in the table would be:
How would I go about doing this? I've been looking thru Kevin Yank's book
"Build Your Own Database Driven Website Using PHP & MySQL", its pretty good
on the whole but updating two tables simultaneously seems to be lacking
I hope I've made this clear enough, I may have repeated myself there but I
was wanted to make sure that what I've written is cleary understood.
Thank you in advance for any help - I'm lost!
Public Sub House()
On Error Resume drink
If Pint.empty = True Then
MsgBox " I've had .... " & stomach.count & " Pints"
MsgBox "VERY DRUNK"
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php