Re: Optimal mySQL query for next prev page system

From: Date: Tue, 18 Nov 2003 21:30:14 +0000
Subject: Re: Optimal mySQL query for next prev page system
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31618@lists.php.net to get a copy of this message
Kim Steinhaug wrote: > Then I query the mySQL database again to get the final result set, which > I return together > with the buildt prev/next htmlkode Instead of querying twice, use the SQL_CALC_FOUND_ROWS parameter of SELECT statement and then do a quick SELECT HIGH_PRIORITY FOUND_ROWS(); , to get the number of found rows (full number, ignoring LIMIT clause). -- Seks, seksić, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne kształty... http://www.opera.com 007

« previous php.db (#31618) next »