Couple of observations:
Who's the pollster?
The form whith 5 textboxes should be submitted with METHOD=post
rather than METHOD=get (default)... there is a limit on the number of
characters that can be submitted with "get" and, well, 5 text boxes.
If you have the pk of the answer available (probably a hidden field
saved from the insert) you should be able to update a single answer
with
UPDATE ans_Answer
SET ans_ans = #ans_ans_Field_From_Update_Form#
WHERE ans_ID = #ans_ID_Field_From_From_Update_Form_Saved_From_Insert#
Now whether to issue a single query, 5 queries or a loop is your
choice... whichever should be within a CFTRANSACTION pair.
At 10:10 AM +0000 7/25/00, janey smith wrote:
>any help at all would be much appreciated, kinda stuck with this one, thanks
>in advance
>
>
>>From: "janey smith" <[EMAIL PROTECTED]>
>>Reply-To: [EMAIL PROTECTED]
>>To: [EMAIL PROTECTED]
>>Subject: Re: update db
>>Date: Mon, 24 Jul 2000 16:51:19 GMT
>>
>>any ideas on this one?
>>
>>
>> >From: "janey smith" <[EMAIL PROTECTED]>
>> >Reply-To: [EMAIL PROTECTED]
>> >To: [EMAIL PROTECTED]
>> >Subject: update db
>> >Date: Mon, 24 Jul 2000 13:33:56 GMT
>> >
>> >on my update page i have 5 textboxes and i can't seem to get the database
>> >to
>> >update, on the previous page i used to loop to view what the user
>>inserted
>> >into the database, is there anyway i can use this same loop to update
>> >records in the db, the field in the db is ans_ans, and it's related to
>> >another table using the primary key..
>> >on the original form where the values were inserted the form names are,
>> >ans_answer1, ans_answer2....ans_answer5.
>> >
>> >this is the code to view what was inserted.
>> ><CFQUERY NAME="GetAnswers" DATASOURCE="quickpoll">
>> > SELECT ans_ID,ans_Ans
> > > FROM ans_Answer A
>> > WHERE ans_pol_ID = #url.PollID#
>> ></CFQUERY>
>> ><!-- Display HTML FORM Here with values filled -->
>> >
>> >
>> ><CFLOOP QUERY="GetAnswers">
>> ><input type="hidden" name="ans_id#GetAnswers.CurrentRow#"
>> >value="#GetAnswers.ans_id#">
>> ><cfoutput><p>Answer #GetAnswers.CurrentRow#:
>> > <input type="text" name="answer#GetAnswers.CurrentRow#" size="45"
>> >value="#GetAnswers.ans_Ans#">
>> ></cfoutput>
>> ></CFLOOP>
>> >
>> >So can i incorporate the above to update my db on my upodate page.
>> >
>> >i'd really appreciate any help on this one!
>> >________________________________________________________________________
>> >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>> >
>> >------------------------------------------------------------------
>>------------
>> >Archives: http://www.mail-archive.com/[email protected]/
>> >To Unsubscribe visit
>> >http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
>>or
>> >send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>> >the body.
>>
>>________________________________________________________________________
>>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>>
>>--------------------------------------------------------------------
>>----------
>>Archives: http://www.mail-archive.com/[email protected]/
>>To Unsubscribe visit
>>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>>the body.
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_tal
>k or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.