Re: DB : affectedRows() on an UPDATE query ?
| From: | Tomas V.V.Cox | Date: | Sun, 05 Aug 2001 15:56:00 +0000 |
| Subject: | Re: DB : affectedRows() on an UPDATE query ? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1305@lists.php.net to get a copy of this message | ||
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.
Tomas V.V.Cox