Depends on what you want to order it by....


a table of 10 values numbered 1 - 10.....


<cfquery name="getlast" datasource="yourdata" maxrows="1">
SELECT *
FROM Numbers
ORDER BY NumberID DESC(descending) ASC(ascending)
</cfquery>


<cfoutput>
        #getlast.numberid#
</cfoutput>


Use only DESC or ASC in your Order By statement

hth

kevin

~~~~~~~~~~~~~~~~~
Kevin Mansel
Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221



-----Original Message-----
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 10:33 AM
To: CF-Talk
Subject: Order By


How can I display an output in reverse order by?
I want only the last record to be displayed.

Thansk for your help,
Rich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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