Home » Database » DB » Bug #2734
error in function buildManipSQL
Details
| Submitted | 2004-11-10 18:32 UTC |
|---|---|
| From | carys at campusregistry dot com |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | 5.0.2 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2004-11-10 18:32 UTC] carys at campusregistry dot com
Description:
------------
i was attempting to use autoExecute (with DB_AUTOQUERY_UPDATE) with a simple where clause and it kept throwing the following error...
Warning: preg_match() expects parameter 2 to be string, object given in /usr/share/pear/DB.php on line 350
I traced autoExecute and found the following puzzling code in buildManipSQL in common.php
Reproduce code:
---------------
...
if ($where) {
$sql .= " WHERE $sql";
}
...
i believe that code should read
if ($where) {
$sql .= " WHERE $where";
}
i made the changes myself and the updates function properly now.