View Full Version : insert data into multiple table
azmaliya
Jul 19th 2005, 7:17 pm
did anyone know how to insert data into multiple table in a form using coldfusion?
jimrthy
Jul 21st 2005, 3:34 pm
Don't know the first thing about coldfusion, sorry. I know that it can't be done with dreamweaver. You have to edit the code and write and run the queries yourself. By hand. It took me hours of research to find a straight answer to this.
Cold Fusion might be in the same boat.
J.P
Jul 31st 2005, 3:52 pm
Hi this may be a bit late but;
the simple way would be to have 2 queries at the top of the page ie
<CFQUERY name="Testing" datasource=" ">
INSERT INTO Table1(data,data1)
VALUES ('#form.data#','#form.data1#')
</CFQUERY>
<CFQUERY name="Testing" datasource=" ">
INSERT INTO Table2(data,data1)
VALUES ('#data#','#data1#')
</CFQUERY>
Long as the tables have the same names and structure this is a easy way to do it
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.