Ask a Question related to Coldfusion Database Access, Design and Development.
-
dtubbs #1
Re: mulitple query insert problem
Ben.
I am doing the scenario where the id key is auto generated from Access. I
know I need to get that id to do the second insert into the related table, but
I don't know how to retrieve that id. Could I do some sort of retrieve the
last record added?
thanks
dtubbs Guest
-
Dynamic insert query problem.
Why is not working? Thanks. <cffunction name="InsertRow" hint="Insert a row in the table" access="remote" returnType="query" > <cfargument... -
How do I Query mulitple datasources?
Here is what I have and what I need to do... 1. I have multiple dabases with financial transactions. All are based on the same table structure. ... -
Mulitple recordset speed problem.
Hi! I hav e solution thar loops one recordset and in the loop opens an other. All off a sudden it is getting reeeeeeeeel slooooooow. On one server!... -
Mulitple Table Query Help
I'm not sure the follow multiple table query is the right way to do what I need to do although it seems to be working: $php_SQL = "SELECT * ".... -
SQL Insert Query using ADO
Hi, I am sending an SQL Insert query to my ADO connection object, my Insert query looks a litte like this... INSERT INTO tblRequests... -
philh #2
Re: mulitple query insert problem
Like Ben said, put a SELECT statement between the first and second INSERTs:
<cfquery name='getPK' ... SELECT MAX(id) as newpk from TheFirstTable </cfquery>
and then use getPK.newpk as the value to use as the foreign key in the second
INSERT.
philh Guest
-



Reply With Quote

