Re: Re: Too many records to display in one web page

From: Date: Tue, 29 May 2007 23:51:54 +0000
Subject: Re: Re: Too many records to display in one web page
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-255772@lists.php.net to get a copy of this message
Steve wrote:
The way I handle it: Step 1- Add SELECT SQL_CALC_FOUND_ROWS to the front of your initial query and add the pagination limit to the end (LIMIT 200, 400 or whatever range you want to display.) Step 2- Do a 2nd query: SELECT FOUND_ROWS() immediately after.
With a *HUGE* clause that this only works with mysql. There are other databases out there :P -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#255772) next »