Skip to content

Instantly share code, notes, and snippets.

@florinel-chis
Created January 17, 2014 17:42
Show Gist options
  • Save florinel-chis/8477897 to your computer and use it in GitHub Desktop.
Save florinel-chis/8477897 to your computer and use it in GitHub Desktop.
Magento - Zend_Db_Statement_Pdo::_execute - for developers
#Zend_Db_Statement_Pdo::_execute
public function _execute(array $params = null)
{
try {
if ($params !== null) {
return $this->_stmt->execute($params);
} else {
return $this->_stmt->execute();
}
} catch (PDOException $e) {
#require_once 'Zend/Db/Statement/Exception.php';
//display something useful
$this->_stmt->debugDumpParams();
//this exception contains a message saying something went wrong
throw new Zend_Db_Statement_Exception($e->getMessage(), (int) $e->getCode(), $e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment