SELECT SQL_CALC_FOUND_ROWS * FROM <tablename> limit 0,10; SELECT FOUND_ROWS();
$row = mysql_fetch_row(mysql_query(“SELECT FOUND_ROWS()”)); $total = $row[0];
We can get totat records by using above query.
This is for very large records.
This speeds up the query and page execution.
This entry was posted on Friday, March 25th, 2011 at 9:12 am and is filed under mysql. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
Connecting to %s
Notify me of follow-up comments via email.
Get every new post delivered to your Inbox.