Object of class stdClass could not be converted to string

后端 未结 6 977
时光说笑
时光说笑 2020-12-01 11:45

I am having a problem with PHP at the moment, I am getting this error,

Object of class stdClass could not be converted to string the error occurs when

6条回答
  •  鱼传尺愫
    2020-12-01 12:24

    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

提交回复
热议问题