the FOUND_ROWS() function
mysql>
mysql> SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 147 |
+-----------------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT FOUND_ROWS();
+--------------+
| FOUND_ROWS() |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)
mysql>
mysql>
Related examples in the same category