Michael,
You can use the maxrows="1" in the cfquery statement.

example:

<CFQUERY NAME="queryname" DATASOURCE="datasourcename" maxrows="1">
select field1,field2
from table
</CFQUERY>


Dan


----- Original Message -----
From: "Michael Gribbin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 10:09 PM
Subject: One record query output


> Hi, I'm trying to find out if it's possible to limit the output of a query
> to one record. I have a database that is sorted in decending order and I
> only want the top record (the one with the biggest total) to display. I
can
> do a work-a-round by setting a variable to "on" before the query output
and
> turning it "off" after the first record is processed and then <cfif>
> skipping the rest of the records, but was hoping to do it in the query
it's
> self.
>
> Possible?
>
> Thanks in advance.
>
> Michael Gribbin
> Digital Marketing Alliance
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to