private function logErrorInfo($handle, $label = '')
{
$errorInfo = $handle->errorInfo();
$this->errorCode = $errorInfo[1];
$this->errorMsg = $errorInfo[2];
if ($this->useErrorLog) {
error_log('DB CLASS ERROR:(' . $this->errorCode . ') ' . $this->errorMsg . ' :: ' . $this->lastQuery . ' :: URL ' . $_SERVER['REQUEST_URI'] . ' M/S:' . self::$connectParamsMaster['host'] . '/' . $this->connectParams['host'], 0);
}
self::$errorCntr++;
// Check for too many errors
if (self::$errorCntr < 10) {
self::$errors[] = array('connection' => $label, 'code' => $errorInfo[1], 'msg' => $errorInfo[2]);
} elseif (self::$errorCntr == 10) {
self::$errors[] = array('connection' => 'n/a', 'code' => 0, 'msg' => 'Too many errors logged');
}
if ($this->debug > 0) {
echo 'DB ERROR: ' . $errorInfo[1] . '-' . $errorInfo[2] . "\n";
}
return 1;
}