-
Bug
-
Resolution: Fixed
-
3.0.0
-
None
-
PHP Environment:
Database:
The following code outputs 0 instead of the right db error code.
$db->sql_return_on_error(true);
|
$db->sql_transaction('begin');
|
if (!$db->sql_query('this will fail')) {
|
$error = $db->sql_error();
|
echo $error['code'];
|
}
|
sql_query calls sql_error in case of an error which makes silently a rollback without preserving the reason for the error. (Tested with mysqli layer only)