Click to See Complete Forum and Search --> : last 3 records..


weee
06-14-2004, 06:37 PM
How can I show the last 3 records that are in the Databse?

Thasnk!

peachy
06-14-2004, 09:20 PM
Have you tried reading through the records to count them then read again with a counter and when your counter is equal to or greater than the number of records minus 3 then display.
It's primitive but should work.

buntine
06-14-2004, 09:24 PM
If you have an autonumber field as in ID (which, you almost always should), this will work.

sql = "SELECT BOTTOM 3 * FROM tableName ORDER BY id ASC"

Regards,
Andrew Buntine.