Andy,

I typically do this:

<!--- On the Form Page  --->
<input type="text" name="field1" value="#form_value_to_edit#">
<input type="hidden" name="hidden_field1" value="#original_value#">


<!--- On the Post Page... you can loop and evaluate each field  --->
<cfif FORM.field1 is FORM.hidden_field1>
        SQL Update
</cfif>


Hope that helps.




-----Original Message-----
From: Andy Mcshane [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 26, 2006 2:25 AM
To: CF-Talk
Subject: Only update DB if data has changed?

Hi all, does anybody have any ideas how I could best implement the
following;

I have a page that loads anything up to about 30 individual records at a
time. Each record consists of 17 fields of data. All the records are
displayed on the page to give the user the option of editing any individual
field. When the user then submits the page I need to be able to work out
which records have had data changed and only do database updates for those
specific records. Having an individual submit for each record is not an
option, the whole page must be submitted as one but only records that have
changed should be updated. Can anybody suggest a method for doing this? 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241550
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to