Hello,
Making rest api using CodeIgniter 3.0.3 I want in case of mysql error to return error description in json return block
In case of
I get error message like on my screen :
PHP Code:
Error Number: 1054
Unknown column 'userna' in 'field list'
SELECT `id`, `userna` FROM `bp_users` ORDER BY `username` ASC LIMIT 4, 2
Filename: models/Muser.php
Line Number: 219
if
I did not find how to log these errors.
I googled and found :
PHP Code:
$this->db->call_function('error') and $this->db->call_function('errno')
where $this - is current control but they show nothig
Also I found :
Quote: Currently it seems we can't get query error message since _error_messageand _error_number are protected methods.
I use 'dbdriver' = 'mysqli'
Which is the good way to get errors text in this case?