Re: DB : affectedRows() on an UPDATE query ?

From: Date: Tue, 07 Aug 2001 11:30:12 +0000
Subject: Re: DB : affectedRows() on an UPDATE query ?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1312@lists.php.net to get a copy of this message
Manuel Lemos wrote: > > Hello, > > "Tomas V.V.Cox" wrote: > > > > Sylvinus Prodi wrote: > > > > > > Hello all, > > > > > > It would be great to allow an affectedRows() (returning a DB_Result instead > > > of a DB_OK) with UPDATE or DELETE queries ! > > > > affectedRows() works only with UPDATES/INSERT/DELETE queries. > > > > $db->query('delete * from users'); > > echo "I have deleted " . $db->affectedRows() . " users"; > > > > > It works with mysql but I dont know if it is possible with others db so that > > > it could be done > > > > It's implemented in all backends. > > Ermm... Interbase API does not seem to provide a way for determine the > number of affected rows, Someone sent time ago a patch for supporting affected row in Ibase: http://www.geocrawler.com/lists/3/Web/5/75/4454246/ http://www.phpbuilder.com/mail/php-db/2000101/0275.php So my though is that probably is supported by the API but not yet by PHP. Tomas V.V.Cox

« previous php.pear.dev (#1312) next »