I need to check if a mysql connection has been successful, otherwise return something else instead of it spitting out an error message (see error message below). Is there any way to do this?
Connection
$db3 = new Zend_Db_Adapter_Pdo_Mysql(array(
'host' => 'xxx',
'username' => 'xxx',
'password' => 'xxx',
'dbname' => 'xxx'
));
I have tried
Error
Connection
$db3 = new Zend_Db_Adapter_Pdo_Mysql(array(
'host' => 'xxx',
'username' => 'xxx',
'password' => 'xxx',
'dbname' => 'xxx'
));
I have tried
if(!$db3->getConnection()) { return $this->responseError('No no no!'); }
Error
SQLSTATE[HY000] [1045] Access denied for user ....