DB Error: mismatch

From: Date: Mon, 28 Mar 2005 15:28:37 +0000
Subject: DB Error: mismatch
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18375@lists.php.net to get a copy of this message
Does someone know the answer to this puzzle? The attached code snippet was developed and tested on a SUSE 9.1 install and works without any issues. But on the production server, a Sunfire V100 running Solaris 9.0, apache2, mysql 4.0.24 and PHP 5.0.3; all other code including successful queries of the database work fine, but when the program attempts to update or create new data the system issues a DB Error: mismatch. If I do a direct query to the database, I can edit all day. I also changed the error reporting to use mysql_error() and mysql_errnum() and it returns "0". I have since reinstalled mysql and recompiled PHP without any luck. Because I get a DB:error and no mysql error is there a chance there is a PEAR issue? Any ideas? snippet: _______________________________________ $sql = $db->prepare("UPDATE cutsheet SET cutsheet.StationQuad = '$StationQuad', cutsheet.StationPort = '$StationPort', cutsheet.SSSystemName = '$SSSystemName', cutsheet.SSIPAddress = '$SSIPAddress', cutsheet.SStackSwitch = '$SStackSwitch', cutsheet.SSSwitchPort = '$SSSwitchPort', cutsheet.PortSpeed = '$PortSpeed', cutsheet.PortDuplex = '$PortDuplex', cutsheet.VlanNumber = '$VlanNumber', cutsheet.Network = '$Network', cutsheet.ConnType = '$ConnType', cutsheet.Notes = '$Notes', cutsheet.LastUpdate = '$Cdate', cutsheet.PortDisable = '$PortDisable', cutsheet.DatePortDisable = '$DatePortDisable', cutsheet.TTPortDisable = '$TTPortDisable' WHERE cutsheet.id = '$id'"); if (DB::isError($sql)) { die($sth->getMessage()); } $res =& $db->execute($sql, 1); if (DB::isError($res)) { die($res->getMessage()); } James E. Fainer Network Operations, Manager Northeastern University j.fainer@neu.edu

« previous php.pear.general (#18375) next »