Sorry missed one of them.

<cfif NOT Len(trim(instructorid)) AND NOT Len(trim(lastname)) AND
NOT Len(trim(firstname))>

OR

<cfif Len(trim(instructorid)) eq 0 AND Len(trim(lastname)) eq 0 AND
Len(trim(firstname)) eq 0>

Regards
Dale Fraser

http://dalefraser.blogspot.com



-----Original Message-----
From: Dale Fraser [mailto:[EMAIL PROTECTED] 
Sent: Friday, 20 July 2007 12:30 PM
To: CF-Talk
Subject: RE: How do I properly check for an empty string?

No,

Your logic is back to front.

<cfif NOT Len(trim(instructorid)) AND NOT Len(trim(lastname)) AND
Len(trim(firstname))>

OR

<cfif Len(trim(instructorid)) eq 0 AND Len(trim(lastname)) AND
Len(trim(firstname)) eq 0>

Regards
Dale Fraser

http://dalefraser.blogspot.com



-----Original Message-----
From: Eric Roberts [mailto:[EMAIL PROTECTED] 
Sent: Friday, 20 July 2007 12:01 PM
To: CF-Talk
Subject: RE: How do I properly check for an empty string?

Not knowing what your data is, but could it potentially contain something
like a line feed or a carriage return?  That would come up as a 0 length
string that still has length...

Eric

-----Original Message-----
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 19, 2007 12:14 PM
To: CF-Talk
Subject: Re: How do I properly check for an empty string?

I tried 

<cfif Len(trim(instructorid)) AND Len(trim(lastname)) AND
Len(trim(firstname))

And rows of empty strings still get thru to <cfelse> and added to the query.


There's somethin I'm not seeing here...

Thanks,
Will







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284172
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