I have an add "Place to visit" form that I need to process into two separate
tables in my DB. The form takes various information about a place to visit.
That particular place may have many categories assigned to it for viewing
purposes on another page. And the check boxes used to note which categories the
place to visit is to have is generated dynamically from another table.
The action script is coded:
<!--- This pulls the id and title from the record just added to the places
table which is done by code not shown here --->
<cfquery name="getid" datasource="fr">
SELECT ID, TITLE
FROM TODO
WHERE TITLE = "#form.title#"
</cfquery>
<!--- The code below is attempting to insert multiple checkbox information into
another table in my db. If I only select one check box the action script works
great and place the info into the two tables I need it do. However, if I select
more than one category by clicking on multiple checkboxes I get an insert db
error. I've tried multiple ways to do the cfloop but it won't get past the
first record. Thoughts? --->
<cfset todolistID = #getid.ID#>
<cfset todoCatList = #Form.todoCheck#>
<cfquery name="putCatList" datasource="fr">
INSERT INTO TODO_CatList
(
todoListID,
todoCatList
)
VALUES
(
#todoListID#,
"#todoCatList#"
)
</cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2330
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15