On 9/6/00, Dan Haley penned:
>Two totally different beasts.  If you want to pull data back from the
>database and then determine how many rows were returned, use
>query.recordcount rather than going back to the database for a row count.
>If you only want to find out how many rows but don't need the data, then
>count() is your best bet rather than pulling the data across the wire and
>using CF's recordcount.

I only need the number of records. No data. The customer is charged 
based on the number of sessions used. So, I guess you answered my 
question. :) Thanks.

<CFQUERY DATASOURCE="#attributes.DSN#" NAME="getsessions">
SELECT count(sessiondate) as sessionsused
FROM sessions_used
WHERE sessiondate >= #createodbcdatetime(getfirst)#
and sessiondate <= #createodbcdatetime(getlast)#
and customerid = '#customerid#'
</CFQUERY>
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to