try a trim() as well.
<cfif len(trim(arguments.asking1)) GT 0 or len(trim(arguments.asking2)) GT 0>
<cfif len(trim(arguments.asking1)) GT 0 AND
len(trim(arguments.asking2)) EQ 0>
... (etc)
also, just out of curiousity... your first 2 radio buttons aren't
named, so aren't passing anything to the action page, are they? just
wondered what purpose they served.
You might also just want to have one form field for "price", and then
a checkbox as to whether or not it's "negotiable". that'd save you
the hassle of checking this form field's length vs that form field's
length...
On 12/21/06, Doug Brown <[EMAIL PROTECTED]> wrote:
> Just to make this easy for everybody to understand. Here is what is happing,
> bye the way this is an update to the database.
>
> <input type="radio" value="Firm"><input type="text" name="asking1" value="">
> User enters price (firm price)
> OR
> <input type="radio" value="Negotiable"><input type="text" name="asking2"
> value=""> User enters price (Negotiable price)
> OR
> <input type="radio" name="price_option" value="free">
> <input type="radio" name="price_option" value="make_offer">
>
>
>
> And the update query
>
>
> <CFQUERY name="NewClassID" datasource="#APPLICATION.DB#"
> username="#APPLICATION.UN#" password="#APPLICATION.PW#">
> UPDATE #APPLICATION.DBPRE#Advertisements
> SET CategoryID = #ARGUMENTS.CategoryID#,
> SCategoryID = #ARGUMENTS.SCategoryID#,
> title = '#ARGUMENTS.title#',
>
> <!---HERE IS WHERE I AM STUCK--->
> <cfif len(arguments.asking1) or len(arguments.asking2)>
> <cfif len(arguments.asking1) AND not(Len(Arguments.asking2))>
> price = #arguments.asking1#,
> <cfelse>
> <cfif not(len(arguments.asking1)) AND len(Arguments.asking2)>
> price = #arguments.asking2#,
> </cfif>
> </cfif>
> <cfelse>
> price = 0,
> </cfif>
> </CFQUERY>
>
>
>
>
>
>
>
> 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:264863
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4