I use codeignator and I got the error:
Object of class stdClass could not be converted to string.
for this post I get my result
I use in my model section
$query = $this->db->get('user', 10);
return $query->result();
and from this post I use
$query = $this->db->get('user', 10);
return $query->row();
and I solved my problem