Luke try this:
<!----- First get the ID based on the AutoNumber ----->
<cfquery name="ShowTopID" datasource="foo" dbtype="ODBC">
SELECT MAX(ID) AS TopID
FROM yourTable
</cfquery>
<cfset TopID = #ShowTopID.TopID#>
<cfset LowID = (TopID - 9)>
<cfquery name="showRecords" datasource="foo" dbtype="ODBC">
SELECT Date
FROM yourTable
WHERE ID BETWEEN #TopID# AND #LowID#
</cfquery>
<cfoutput query="ShowRecords">#Date#<br></cfoutput>
Sebastian
on 8/19/00 10:16 AM, Luke Kearney at [EMAIL PROTECTED] wrote:
>
> Hi There CFer's
> Can anyone give me a hint on how to tell CF to display the most recent =
> 10 records from a DB. I am using MS Access right now. I only want to =
> output the most recent 10 records. I want the DB to count backwards from =
> the most recent record but I cannot figure the Query. The thing is that =
> the date/time stamp on the records is inserted by the DB itself not the =
> client. Is this a problem ? Should I be trying to get the client to =
> input the time/date and then have CF validate this info ? I can see a =
> problem when the times don't match between the client and the server. =
> Would CF not validate the time stamp if the times did not exactly match =
> ( I suspect it might be tough to get the times perfectly in synch ).
>
> Hope someone can help me out here.
>
> Luke Kearney
> East West Technology Services K.K.
>
>
> ------=_NextPart_000_001B_01C00A3B.F1EEEF50
> Content-Type: text/html;
> charset="iso-2022-jp"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Diso-2022-jp" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3D"MS PMincho" size=3D2>Hi There CFer's</FONT></DIV>
> <DIV><FONT face=3D"MS PMincho" size=3D2>Can anyone give me a hint on how =
> to tell CF=20
> to display the most recent 10 records from a DB. I am using MS Access =
> right now.=20
> I only want to output the most recent 10 records. I want the DB to count =
>
> backwards from the most recent record but I cannot figure the Query. The =
> thing=20
> is that the date/time stamp on the records is inserted by the DB itself =
> not the=20
> client. Is this a problem ? Should I be trying to get the client to =
> input the=20
> time/date and then have CF validate this info ? I can see a problem when =
> the=20
> times don't match between the client and the server. Would CF not =
> validate the=20
> time stamp if the times did not exactly match ( I suspect it might be =
> tough to=20
> get the times perfectly in synch ).</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"MS PMincho" size=3D2>Hope someone can help me out=20
> here.</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"MS PMincho" size=3D2>Luke Kearney</FONT></DIV>
> <DIV><FONT face=3D"MS PMincho" size=3D2>East West Technology Services=20
> K.K.</FONT></DIV>
> <DIV> </DIV></BODY></HTML>
>
> ------=_NextPart_000_001B_01C00A3B.F1EEEF50--
>
> ------------------------------------------------------------------------------
> 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.
>
------------------------------------------------------------------------------
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.