Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
ozzy
- Forum Commoner
- Posts: 74
- Joined: Tue Apr 11, 2006 4:45 pm
Post
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
-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
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....
-
Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Post
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.
(#10850)