Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[PEAR]DB Error: mismatch
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




Report this thread to moderator Post Follow-up to this message
Old Post
J Fainer
03-28-05 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:49 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.