I am having trouble trying to insert multiple rows into MySQL.
I did a lot of reading at different forums where Rudy (r937) posted answers, but I still can't get it to work.
My data is coming for a form box (FORM.cityCodes) where multiple items can be selected looks like this:
(dbv_pmId, FORM.cityCodes)
1170, 133
1170, 134
1170, 135
After reading Rudy's answers on other forums I replaced the VALUES statement with SELECT:
<CFQUERY datasource="#DSN#" >
INSERT INTO targetcs (pmFk, csFk)
SELECT (<cfqueryparam value=#dbv_pmId# cfsqltype='CF_SQL_INTEGER'>,
<cfqueryparam value=#FORM.cityCodes# cfsqltype='CF_SQL_INTEGER'>)
</CFQUERY>
pmFk is "property manager foreign key"
csFk is "city and state foreign key"
But changing it to SELECT didn't help.
Any ideas?
I did a lot of reading at different forums where Rudy (r937) posted answers, but I still can't get it to work.
My data is coming for a form box (FORM.cityCodes) where multiple items can be selected looks like this:
(dbv_pmId, FORM.cityCodes)
1170, 133
1170, 134
1170, 135
After reading Rudy's answers on other forums I replaced the VALUES statement with SELECT:
<CFQUERY datasource="#DSN#" >
INSERT INTO targetcs (pmFk, csFk)
SELECT (<cfqueryparam value=#dbv_pmId# cfsqltype='CF_SQL_INTEGER'>,
<cfqueryparam value=#FORM.cityCodes# cfsqltype='CF_SQL_INTEGER'>)
</CFQUERY>
pmFk is "property manager foreign key"
csFk is "city and state foreign key"
But changing it to SELECT didn't help.
Any ideas?