I\'ve recently started work on a new project using PHP5 and want to use their PDO classes for it. The problem is that the MySQL PDO Driver doesn\'t support rowCount() so the
You can issue a SELECT FOUND_ROWS() query right after the original SELECT query to get row count.
SELECT FOUND_ROWS()
SELECT
$pdo->query("SELECT * FROM users"); $foundRows = $pdo->query("SELECT FOUND_ROWS()")->fetchColumn();
See also: MySQL Docs on FOUND_ROWS()