I am having some troubles with an if statement and cannot seem to get it right. 
I have 2 text fields that hold the value of the price of items a user is 
selling, a user can fill in either one of the fields or none at all. If the 
user chooses not to fill in these fields, then I want to add a default value of 
0 to the price in the database.


I am using this so far with not luck. I tried using <CFELSEIF> with no luck 
either. In the below code, I will get two price objects due to one or both 
fields being empty.

  <cfif arguments.asking1 IS NOT "">
  price = #ARGUMENTS.asking1#,
  </cfif>
  
  <cfif arguments.asking2 IS NOT "">
  price = #ARGUMENTS.asking2#,
  </cfif>
  
  <cfif arguments.asking1 IS "" AND arguments.asking2 IS "">
  price = NULL,
  </cfif>



Doug B.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-Talk/message.cfm/messageid:264847
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to