Re: Optimal mySQL query for next prev page system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux