How can I count the numbers of rows that a mysql query returned?

Solution:

use SQL_CALC_FOUND_ROWS in your query, followed by SELECT FOUND_ROWS();


Example:
SELECT SQL_CALC_FOUND_ROWS * FROM transactionhead;
SELECT FOUND_ROWS();
Example:


Post a Comment

0 Comments