method check documentation in bbn\Db\HasError
Checks if the database is ready to process a query.
function()
{
if (!property_exists($this, 'current')) {
throw new \Exception('Property current does not exist');
}
// if $on_error is set to E_CONTINUE returns true
if (in_array($this->on_error, [Errors::E_EXCEPTION, Errors::E_CONTINUE])) {
return true;
}
// If any connection has an error with mode E_STOP_ALL
if (self::$_has_error_all && ($this->on_error === Errors::E_STOP_ALL)) {
return false;
}
// If this connection has an error with mode E_STOP or E_STOP_ALL
if ($this->_has_error && in_array($this->on_error, [Errors::E_STOP, $this->on_error === Errors::E_STOP_ALL])) {
return false;
}
return true;
}
Checks if the database is ready to process a query. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2024
BBN Solutions