I have a form used to populate 2 tables: Provider and Contacts. Provider has
a foriegn key column - Contact1ID - which has a foreign key relationship
with the prmary key - ID - in the Contacts table. The form submits data to
Contacts then Provider but I need the ID generated by the Contacts
submission to be entered into the Contact1ID column in the Provider table.
If I use this:
INSERT INTO Provider(Contact1ID)
SELECT ID FROM Contacts
WHERE FirstName='$contact1{FirstName}'
AND Surname='$contact1{Surname}'
.... all I get is a new row.
UPDATE doesn't seem to allow SELECT to grab the new ID either.
Any ideas?
zaphod