----- Original Message ----- 
From: "Les Mizzell" <[EMAIL PROTECTED]>


> In the scenerio below, how would I set a default value - "99" maybe -
> for form.group_sort_#gpIDX# - if the form field was left blank?


I'm sure there are many ways, but this should work.  Also, don't forget to 
secure those queries against SQL Injection  ;->

<cfloop index="idx" list="#FORM.GROUPid#">

<cfset this_group_sort = form["group_sort_#gpIDX#"]>

<cfquery name="update">
  UPDATE MyTable
  SET
     group_sort = #iif(len(trim(this_group_sort)),"this_group_sort",99)#
     where link_group = '#evaluate("form.thisGROUP_#gpIDX#")#'
</cfquery>

</cfloop>

~Brad 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312064
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to