DB->display_error() |
from : http://www.codeigniter.com/userguide3/da...play_error
I try to identify Update Database success or not success In model i try to return boolean but Database error : A Database Error Occurred PHP Code: if ($this->Temples_model->update_temple_view($id, $data_to_temple)) { PHP Code: function update_temple_view($id, $data_to_temple)
if($report !== 0){
You store the error as $report['error'], but only check if $report isn't 0, but it's an array, which won't be 0. But most DB operations return TRUE or FALSE depending on success. I haven't used CI3, but your model should probably be something like: PHP Code: function update_temple_view($id, $data_to_temple) { PHP Code: if ($this->Temples_model->update_temple_view($id, $data_to_temple)) { |
Welcome Guest, Not a member yet? Register Sign In |