"<<previous<< 2 3 4 5 >>next>>" scheme

"<<previous<< 2 3 4 5 >>next>>" scheme

Post by hSipl » Wed, 30 Aug 2006 00:26:18


hi all,
I am creating a web project with php/mysql.
one of qeury result is too high. it returs several thousand rows.
But I can't show them in one page.
So I wanna create more than one pages
then I shall use "<<previous<< 2 3 4 5 >>next>>" scheme.
but i don't have any idea.
If user clicks 3rd page. I shall show the 3rd page.
How should I do this ?
should I again query the whole or a portion ? what is the function
related to this.
Thank in advance
 
 
 

"<<previous<< 2 3 4 5 >>next>>" scheme

Post by Thomas Mly » Wed, 30 Aug 2006 02:35:39

Also sprach hSiplu:


You could use MySQL's LIMIT clause.

 
 
 

"<<previous<< 2 3 4 5 >>next>>" scheme

Post by hSipl » Wed, 30 Aug 2006 17:51:03

if I use
select * from t1 limit 10;
it shows first 10 returned rows.
It wont work.
it would work if an range could be used
 
 
 

"<<previous<< 2 3 4 5 >>next>>" scheme

Post by hSipl » Wed, 30 Aug 2006 18:25:40

oh
I have found it !
limit [offset,] row_count
that solves everything :)