RE: [PHP] Weird pdo-mysql behavior

From: Date: Thu, 13 Nov 2008 16:25:04 +0000
Subject: RE: [PHP] Weird pdo-mysql behavior
Groups: php.general 
Request: Send a blank email to php-general+get-283261@lists.php.net to get a copy of this message
Perhaps when you try to make the connection you should check the return value and use whatever PDO error-checking methods exist to find out what went wrong, instead of blindly going forward assuming you have a database connection when you don't. Ditto for any result of ->query() What you are doing now is akin to turning the key in a car, not listening to see if it started, and asking a mechanic on the phone why the gas pedal doesn't work... :-)

« previous php.general (#283261) next »