本文整理汇总了PHP中ADOConnection::errorNo方法的典型用法代码示例。如果您正苦于以下问题:PHP ADOConnection::errorNo方法的具体用法?PHP ADOConnection::errorNo怎么用?PHP ADOConnection::errorNo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ADOConnection
的用法示例。
在下文中一共展示了ADOConnection::errorNo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _notifyConnectionErrors
/**
* Notifying shop owner about connection problems
*
* @param ADOConnection $oDb database connection instance
*/
protected function _notifyConnectionErrors($oDb)
{
// notifying shop owner about connection problems
if ($sAdminEmail = self::_getConfigParam('_sAdminEmail')) {
$sFailedShop = isset($_REQUEST['shp']) ? addslashes($_REQUEST['shp']) : 'Base shop';
$sDate = date('l dS of F Y h:i:s A');
$sScript = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
$sReferer = $_SERVER['HTTP_REFERER'];
//sending a message to admin
$sWarningSubject = 'Offline warning!';
$sWarningBody = "\n Database error in OXID eShop:\n Date: {$sDate}\n Shop: {$sFailedShop}\n\n mysql error: " . $oDb->errorMsg() . "\n mysql error no: " . $oDb->errorNo() . "\n\n Script: {$sScript}\n Referer: {$sReferer}";
$this->_sendMail($sAdminEmail, $sWarningSubject, $sWarningBody);
}
//only exception to default construction method
$oEx = new oxConnectionException();
$oEx->setMessage('EXCEPTION_CONNECTION_NODB');
$oEx->setConnectionError(self::_getConfigParam('_dbUser') . 's' . getShopBasePath() . $oDb->errorMsg());
throw $oEx;
}