Re: cvs: php4 /pear/DB mysql.php /pear/DB/tests/mysql 008.phpt
| From: | Andrei Zmievski | Date: | Fri, 08 Dec 2000 14:03:50 +0000 |
| Subject: | Re: cvs: php4 /pear/DB mysql.php /pear/DB/tests/mysql 008.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3031@lists.php.net to get a copy of this message | ||
On Fri, 08 Dec 2000, Stig Bakken wrote:
> function affectedRows()
> {
> - $result = mysql_affected_rows($this->connection);
> -
> + if (preg_match('/(INSERT|UPDATE|DELETE)/i', $this->last_query)) {
Two suggestions here:
1. Use "^" to search for those keywords at the beginning of the query.
2. For MySQL also add "replace" to the list.
-Andrei
* Only 19,999 lines of C++ to my next ski trip... *