Your cfif statement asks for the recordCount to be returned
on if the recordCount is greater than 0.

Try cfif blahName.recordcount GTE 0 and you should
get the recordCount either way.

Rick

-----Original Message-----
From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] 
Sent: Wednesday, March 31, 2010 1:59 PM
To: cf-talk
Subject: CFQUERY Question


I'm running into an odd behavior with CFQUERY (at least I think it is odd)

I have the following code (example)

<cfquery name="blahName" datasource="blah">
   SELECT blah
     FROM blah
   WHERE blah = 1
</cfquery>

<CFIF blahName.recordCount GT 0>
   12345
</CFIF>

if the query blahName returns no results, I thought i would still be able to
access blahName.recordCount....

Am I wrong on this, or is there something else I am overlooking?

Thanks
-Dave




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:332499
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to