If you are doing this exactally as you've coded, then you should use
getcount.recordcount to display the number of records returned.
Alternately, you could do it within your database by running
<cfquery name="getcount" datasource="wweb">
SELECT COUNT(AST) AS AST_Count
FROM wweb
Where AST = 'AST'
</cfquery>
Then by outputting #getcount.AST_Count# you'll get the number of matching
records.
Kinda depends on what you are trying to accomplish...
HTH,
Jeff Garza
Lead Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200
[EMAIL PROTECTED]
http://www.spectrumastro.com
-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 9:00 AM
To: CF-Talk
Subject: quick count
How can I do a quick count within a certain column of a certain text that it
contains?
For instance I have a column called AST which may either be empty or contain
text such as "AST".
I would like to get a count of the occurrences of the "AST" text and display
a number of the occurrences. I tried the COUNT() tag but it counts all the
rows.
Any help appreciated. Thanks.
Robert O.
-------------------------------------------------
This some of my ROUGH coding, but my mind has writers block today:
<CFSET AST_COUNT = 0>
<cfquery name="getcount" datasource="wweb">
SELECT AST FROM wweb
Where AST = 'AST'
</CFQUERY>
<cfoutput query="getcount">
<html>
<head>
<title></title>
AST: #astcount#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists