Re: PDOStatement::rowCount() bug?

From: Date: Tue, 23 Feb 2010 03:39:23 +0000
Subject: Re: PDOStatement::rowCount() bug?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-302289@lists.php.net to get a copy of this message
On Mon, Feb 22, 2010 at 08:18:25PM -0700, Nathan Nobbe wrote: > On Mon, Feb 22, 2010 at 7:50 PM, Paul M Foster <paulf@quillandmouse.com> 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? > > > quick test shows rowCount() working in all 3 cases: > > <?php > /** > * lets test a PDOStatement::rowCount() bug > * using an sqlite3 memory resident database > */ Nifty, but you'll notice that I'm using MySQL, not SQLite3. And you didn't mention which version PHP you're using. Paul -- Paul M. Foster

« previous php.general (#302289) next »