Re: PDOStatement::rowCount() bug?
| From: | Paul M Foster | Date: | Tue, 23 Feb 2010 04:36:47 +0000 |
| Subject: | Re: PDOStatement::rowCount() bug? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302291@lists.php.net to get a copy of this message | ||
On Mon, Feb 22, 2010 at 09:50:30PM -0500, Paul M Foster wrote:
> Using MySQL 5.075, PHP 5.25 on Debian unstable.
>
> Has anyone noticed, when issuing a PDOStatement::rowCount() call after a
> DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the
> actual number of rows affected?
>
> If so, is there a simple workaround?
Update: MySQL 5.1.44.
rowCount() appears to return 0 only on deletes, not updates or inserts.
Paul
--
Paul M. Foster