RE: [PHP] Re: Pagination Optimization

2005-01-18 Thread yangshiqi
09, 2005 2:37 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: Pagination Optimization * Thus wrote Bruno B B Magalhes: > Thanks for your help, in fact helped a lot... Now my function only > performs 2 queries, here it is: > > === >

Re: [PHP] Re: Pagination Optimization

2005-01-08 Thread Curt Zirzow
* Thus wrote Bruno B B Magalhes: > Thanks for your help, in fact helped a lot... Now my function only > performs 2 queries, here it is: > > === > function fetch_paginated($query='',$page=1,$itens=20) > { > $this->query($query); This h

Re: [PHP] Re: Pagination Optimization

2005-01-08 Thread M. Sokolewicz
and now a few small comments to your code ;) Bruno B B Magalhães wrote: Thanks for your help, in fact helped a lot... Now my function only performs 2 queries, here it is: === function fetch_paginated($query='',$page=1,$itens=20) { $this->query($

Re: [PHP] Re: Pagination Optimization

2005-01-08 Thread Bruno B B Magalhães
Thanks for your help, in fact helped a lot... Now my function only performs 2 queries, here it is: === function fetch_paginated($query='',$page=1,$itens=20) { $this->query($query); $total_rows = $this->num_rows();