Welcome Guest, Not a member yet? Register   Sign In
Object of class CI_DB_mysql_result could not be converted to string
#3

[eluser]Lotus18[/eluser]
[quote author="xwero" date="1223917015"]You can't add the query object as content. You have to use the result method before you pass it on to the table library.[/quote]

What do you mean by result method? I also have same problem with the OP. I read this article but I guess this is wrong or maybe I don't really get it. Please give us some example on how to this or give me some sites regarding this problem.

So far I have this code:
Code:
function comments(){
        //echo 'Testing...';    
        $data['title']="My Comment Title";
        $data['comments']="Member Comments";
        $sqlGetTitle="SELECT title FROM tblblogs WHERE blog_id=".$this->uri->segment(3);
        $row=$sqlGetTitle->row_array();
        $data['heading']=$row['title'];
        $this->db->where('blog_id', $this->uri->segment(3));
        $data['query']=$this->db->get('tblComments');
        $this->load->view('blogs/comments', $data);
    }


Any suggestions will be greatly appreciated Smile

Rey Sean


Messages In This Thread
Object of class CI_DB_mysql_result could not be converted to string - by El Forum - 12-09-2008, 07:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB