Home » Database » DB » Bug #3299
Update/Insert on mssql gives false Error
Details
| Submitted | 2005-01-26 10:14 UTC |
|---|---|
| From | php_bug at cklowe dot com |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | 4.3.10 |
| OS | Win32/Apache2.52 |
| Roadmaps | (Not assigned) |
Comments
[2005-01-26 10:14 UTC] php_bug at cklowe dot com
Description:
------------
In the version of Pear shipping with PHP 4.3.10 (DB.php v 1.58, mssql.php v 1.53) isManip queries (i.e. those with Update or Insert) are returning an Error , e.g.
nativecode=0 - Changed database context to 'blah'
even though the query was executed via query() sucessfully, and the database is indeed updated.
I've only tried this with mssql. The problem did not occur with the Pear version in 4.3.8
[2005-02-11 00:45 UTC] jeremy dot krahn at mcomi dot com
Using PHP 5.0.3, Apache 2.0.52 (Win32), and mssql.php 1.55, I was experiencing the same issue as reported by php_bug at cklowe dot com.
Changing lines 144 - 146 from
if (!$result) {
return $this->mssqlRaiseError();
}
to:
if (!$result) {
if (!$result && !$this->affectedRows()) {
return $this->mssqlRaiseError();
}
appears to have resolved the issue.