Re: Weird pdo-mysql behavior

From: Date: Thu, 13 Nov 2008 15:11:40 +0000
Subject: Re: Weird pdo-mysql behavior
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283260@lists.php.net to get a copy of this message
Hi Theodoris First place I'd look is to see if the sql query was successful. If it failed you'll get this error. You can try a simple test $sth = $dbh->query($sql); if ($sth == FALSE) {
       print "failed";
       exit;
} Arno Thanks for the advice but the script works in one of the other systems (running PHP 5.2.x) as well as in the same system using another apache and a different php that is compiled from source and not installed as an rpm package. The query itself works very good but the basic problem is that the $dbh handler probably doesn't get into the getClientFullName properly. If I dump the handler and the $id before calling getClientFullName it seems that their contents are as expected but when this function calls fetch on the handler it fails. I suspect that either PHP version 5.1.6 has a bug on this (but I could find something similar in bugs.php.net) or my distro's package is compiled like... -- Thodoris

« previous php.general (#283260) next »