Inserting form data across multiple tables
I am building a multi page registration form and need to insert the data in to 4 related MySQL tables. DataAssist appears to only use one table at a time. What should i be doing?
I am building a multi page registration form and need to insert the data in to 4 related MySQL tables. DataAssist appears to only use one table at a time. What should i be doing?
If you are inserting into multiple tables, you can apply multiple insert server behaviors to the page. Each insert server behavior inserts into a separate table.
thank you for getting back to me. I will do that. My concern is that I am using the userID as the primary key in the user table, which will be automatically generated by MySQL on the creation of the record, and need to insert it into the foreign key of the address table.
How do I first create the userID key and then insert it into the address table as a foreign key in the same operation.
Thank you
What you would have to do is insert into the user table and then have a recordset to get the id out of the table and then use that id to insert into the other tables. The recordset would have to do the search on all the values inserted into the table to ensure that it is the id you are looking for.
Thanks Jimmy
I got the picture. I will use the email column as the key
Ok, hope everything works out for you. If you run into any additional issues, feel free to open a new thread.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.