On Tue, Jun 16, 2009 at 11:16 AM, Mark Fuqua MdProfinish <
m...@mdprofinish.com> wrote:

>
> Sorry to ask, but does <cfif LEN(TRIM(myquery.MyFieldName))> actually
> suffice as a check for length or do I have to add = 0... <cfif
> LEN(TRIM(myquery.MyFieldName)) = 0>
>

actually that'd be <cfif len(trim(myquery.myfieldname)) eq 0> (note the 'eq'
not '=') :)

Seems like you're saying I can do the following and it will work:
>
> Values(<cfif
> LEN(TRIM(myquery.MyFieldName))>'#myquery.MyFieldName#'<cfelse>"
> "</cfif>, REPEAT...)
>

That's what he's saying.

CF does implicit boolean conversion.  If the number is non zero, it'll come
back as 'true'.

Run a quick test:

<cfset myNum = 3 />

<cfif myNum>
    Yes
<cfelse>
    No
</cfif>

Change out the value of 'myNum' to various values (including a zero) and
you'll see the behavior in action :)

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323538
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