Page 1 of 1

php SQL query question

Posted: Mon Jun 12, 2006 1:59 pm
by ozzy
Hey, this is part of a script i found...

Code: Select all

$query = "SELECT SQL_CALC_FOUND_ROWS txt FROM items LIMIT $start,$pp";
But what do i replace 'SQL_CALC_FOUND_ROWS' with. A row?

and then what do i replace 'items' with. The table?

I have tyed doing this but i get a error. I just wanted to clarify if im doing it right, thanks.

p.s. code from : http://www.vbforums.com/showthread.php? ... ost1988751

Posted: Mon Jun 12, 2006 2:06 pm
by feyd
ozzy wrote:But what do i replace 'SQL_CALC_FOUND_ROWS' with. A row?
Knowing what the query is supposed to do would help determine this.
ozzy wrote:and then what do i replace 'items' with. The table?
yes....

Posted: Mon Jun 12, 2006 2:09 pm
by Christopher
Take a look at the MySQL documentation for SELECTfor more information about SQL_CALC_FOUND_ROWS. It is a modifier that effects queries with LIMITs.