coldfusion update multiple records with one form listgetat
Hi All,
I'm not sure what I'm doing wrong. The form that I have has 11 records but my CFloop to CFQUERY is only returning 1 result. I'm expecting to see 11 records in the Recordset2_UPDATE query. The Recordset2_UPDATE query is just a SELECT statement for now, for testing.
<cfloop from="1" to="#form.totRecords#" index=ct>
<cfquery name="Recordset2_UPDATE" datasource="Incident_Reporting">
SELECT '#form.ID#' as "UID",
'#listgetat(form.ID,ct)#' as ID,
'#listgetat(form.AllDocumentsAttached,ct)#' as AllDocumentsAttached
FROM dbo.tbl_P1
WHERE
ID = #listgetat(form.ID,ct)#
</cfquery>
</cfloop>
Thanks for the second set of eyes!
John
