The rowCount() method returns the number of rows affected by the last SQL statement (e.g., how many
rows were deleted, updated, or inserted). When used with SELECT statements, most drivers (including
MySQL) return the number of rows found by the query. This is extremely useful when you want to verify if a search
was successful before attempting to output any data.
Practical Application: This method is called on the prepared statement object
(PDOStatement) after executing the execute() command. Check the process at home by
following these steps:
users table exists and contains test data within the pdo_db
database.