![]() |
| ||
| insert loop I am not sure how to ask the question, but here goes. I have a multiline survey storing data about a specific project. I want to store the data in the following fields: proj_id strat_issue strat_goal strat_obj strat_value here is an example of my code <form action="strat_survey.cfm?update=gogo" method="post"> This insert code only inserts the same value for all fields <cfquery name="strat_post" datasource="#request.dsn#"> Thanks |
| ||
| Re: insert loop One thing to check is to cfdump the form structure and make sure that the data from the form is correct. <cfdump var="#form#"> Do you have any <cfset> statements that could be over-writing the value of those form variables? If possible, please post the entire strat_survey.cfm page so we can look at it more thoroughly. Thanks |
| ||
| Re: insert loop Here are the results from the CFDUMP struct FIELDNAMES STRAT_VALUE,STRAT_ISSUE,STRAG_GOAL,STRAT_OBJ,VALUE2,STRAT_GOAL SEARCHSTRING [empty string] STRAG_GOAL 1 STRAT_GOAL 1 STRAT_ISSUE Service Delivery,Service Delivery STRAT_OBJ 1.1,1.2 STRAT_VALUE 1 VALUE2 1 Here is how the data was stored recnum; 22 recdate: 04/21/2008 blog_id: strat_issue: Service Delivery,Service Delivery strat_goal: 1 Strat_obJ: 1.1,1.2 strat_value: 1 I need it to update two records, like this 1. recnum 1 recdate 04/21/2008 blog_ID strat_issue Server Delivery strat_goal 1 strag_obj 1.1 strat_value 1 2. recnum 1 recdate 04/21/2008 blog_ID strat_issue Server Delivery strat_goal 1 strag_obj 1.2 strat_value 1 |
| ||
| Re: insert loop I'll have a look at it tomorrow and see if I can help. |
| ||
| Re: insert loop At first glance - looks like you have a typo: <input type="hidden" name="strag_goal" value="1"> <input type="hidden" name="strat_ob" value="1.1"> name="strat_obj" ?? |
| ||
| Re: insert loop you have done a lot of mistakes. forward your pages to me. |
| ||
| Re: insert loop ('#form.strat_issue#','#form.strat_goal#','#strat_obj#','#strat_value#')
Why are you using 'form.value' and 'value' beter to just use al with form.xx like : ('#form.strat_issue#','#form.strat_goal#','#form.strat_obj#','#form.strat_value#')
This can prevent some mistakes in your code. http://www.besmartgoogleit.com/searc...on+form+values |
| All times are GMT -4. The time now is 3:59 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC