Subject Re: [firebird-support] The age old 'count' issue...
Author Milan Babuskov
Milan TomeŇ° - Position wrote:
> Dne 23.02.2010 10:02, Milan Babuskov napsal(a):
>>
>> First | Prev | 2 3 [current] 5 6 | Next | Last
>>
>> To get the last page, I just toggle the ORDER BY clause and before
>> displaying records I fetch them into PHP array and then print on screen
>> in reverse. So it really shows the last 50 records in dataset.
>>
>
> Can I ask what will you do when I hit Last and then Prev page?

You can. :)

It would keep the reversed ORDER BY clause and do all the paging in
reverse until user selectes the "First" option or reaches the first
record (less than 51 records returned).

The only problem I had with this approach is that you cannot tell the
user "where is he" while navigating with backward ORDER BY. So instead
of showing numbers like 2 3 4 5 6, I actually show arrow graphics,
something like this:

first << < | > >> last

<< means 2 pages back, < means 1 page back, etc.

--
Milan Babuskov

==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================