Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Get last 10 entries in database
Wed, Jun 4 2008 5:42 AMPermanent Link

"Jon Lennart Aasenden"
Hi

We are using DBISAM for a small image registration service in our office.
The service is called by our isapi extension to lookup images etc.

I want to fetch the last 10 images registered from the database-- but im not
sure about the most efficient way of doing this with SQL and DBISAM?

the table is simply called "files" and it has a DateTime field called
"made". Also an autoinc ID field and title field (perhaps that is the best
to query?).

Any help or hints is very welcome.

Kind regards

Jon Lennart Aasenden

Wed, Jun 4 2008 6:03 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jon


DBISAM has a TOP command but not a BOTTOM so you have to stand the problem on its head

Something like

SELECT * FROM table ORDER BY datefield DESC TOP 10



Roy Lambert [Team Elevate]
Thu, Jun 5 2008 5:28 PMPermanent Link

"Jon Lennart Aasenden"
That did the trick.

Thank you for your help!

Kind regards

Jon Lennart Aasenden
Norway


"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:CFC472CE-898A-4854-93D3-637285AEC589@news.elevatesoft.com...
> Jon
>
>
> DBISAM has a TOP command but not a BOTTOM so you have to stand the problem
> on its head
>
> Something like
>
> SELECT * FROM table ORDER BY datefield DESC TOP 10
>
>
>
> Roy Lambert [Team Elevate]
>

Image