Possible Duplicate:
PHP PDO - Num Rows
I am working with PDO and MySQL, and I am fairly new to PDO.
So Have two questions?
- What function do I use to count the number of rows found based on a select?
- What function do I use to count the number of rows affected by an insert/delete/update?
According to the documentation it says:
If the last SQL statement executed by the associated PDOStatement was a SELECT statement, some databases may return the number of rows returned by that statement. However, this behavior is not guaranteed for all databases and should not be relied on for portable applications.
That being said what should I use for these?