Thread: LIMIT + OFFSET

LIMIT + OFFSET

From
"MG"
Date:
Hello,
 
I want to show an overview where you can place 16 data sets.
I use the sql-statement
SELECT F1,F2 FROM testtable limit 16 offset 0
 
To show different pages I vary the value for offset.
 
But if I want to stay on a special data set, I have the problem to find the right value for offset.
How can I realize this?
 
Thanks for your help
 
Michaela

Re: LIMIT + OFFSET

From
"A. Kretschmer"
Date:
am  17.01.2006, um 16:43:36 +0100 mailte MG folgendes:
> Hello,
>
> I want to show an overview where you can place 16 data sets.
> I use the sql-statement
> SELECT F1,F2 FROM testtable limit 16 offset 0
>
> To show different pages I vary the value for offset.
>
> But if I want to stay on a special data set, I have the problem to find the right value for offset.
> How can I realize this?

You shoeld add a 'order by F1, F2' to get e defined order for the
result-set.


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===