Insert into linked tables??

2004-02-12 Thread David Johnston
I have a database with two tables (well more but only two are important here) When a risk is created it can have one or more plans (hence the second table) The data that is inserted comes from a cgi form. So I want to insert all risk data into risk_tb and plan_tb. The question is how do I

Re: Insert into linked tables??

2004-02-12 Thread Michael Stassen
Use LAST_INSERT_ID() to get the id. LAST_INSERT_ID() is connection-specific, so you will get the correct value regardless of other users. See http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html for more. Michael David Johnston wrote: I have a database with two tables (well more but only