base on this LINK I came to with this code to make an error message if the ID does not exist
this is my code in CI model
public function user_list_update($id){
$id = $this->db->where('id',$id);
$query = $this->db->get('info');
$row = $query->row();
if($row > 0){ //line 26
return $row;
}else{
echo "does not exist.";
}
}
and in the controller
$id = $this->input->get('id');
$data["user_list"] = $this->um->user_list_update($id);
//some code here to display data of ID
and I get this error
A PHP Error was encountered
Severity: Notice
Message: Object of class stdClass could not be converted to int
Filename: models/users_model.php
Line Number: 26
Backtrace:
File: C:\xampp\htdocs\CI\application\models\users_model.php Line: 26 Function: _error_handler
P.S im new to C.I