Mysql FOUND_ROWS() method is used to get what SQL_CALC_FOUND_ROWS in the SELECT query returns. SQL_CALC_FOUND_ROWS name after the SELECT which returns Query rows/record count not limit countt.
Example
SELECT SQL_CALC_FOUND_ROWS * from USER_INFO WHERE 1 LIMIT 0,10;
SELECT FOUND_ROWS();
|
Example Found_Rows() method in Mysql
SELECT SQL_CALC_FOUND_ROWS * from USER_INFO WHERE 1 LIMIT 0,10;
SELECT @result_count := FOUND_ROWS();
|
@result_count returns
256
256 is a user_info record count.
Note: Don't run both queries seperately.
|