Does someone know the answer to this puzzle?
The attached code snippet was developed and tested on a SUSE 9.1 install and works witout any issues. But on the production server, a sunfire 100 running Solaris 9.0, mysql 4.0.21 and PHP 5.0.2; all other code including succesful reads of the database work fine but the system issues a DB Error: mismatch when ever an attempt to write to the database via the application. If I do a direct query to the database, I can edit all day. 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());
}