I just found this on stack Getting single value from a single row wi开发者_Python百科th Mysql/PHP:
$result = end(mysql_fetch_array(mysql_query('SELECT FOUND_ROWS()', $db)));
I searched and could not find an easy to understand description on google.
Could somebody please explain select found_rows()?
What would $db possibly look like?
Does this return a particular value of a row or the entire row like select *?
$db
is a MySQL connection handle. FOUND_ROWS()
returns the total number of rows that would have been returned if the query didn't have a LIMIT
clause, without re-running the query.
精彩评论