Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.