Welcome Guest, Not a member yet? Register   Sign In
A query in multiple tables
#2

[eluser]Sumon[/eluser]
change your controller as

Code:
function comments()
{
    $data['title']= "Comment Title";    

    $SqlInfo="select w.name, c.rating from wines w, wine_comments c where w.id=c.wine_id AND  c.user_id = $logged_in_user_id";
    $query = $this->db->query($SqlInfo);
    $data['query'] = $query->row_array();

    $this->load->view('wine_comment.php', $data);
}


Messages In This Thread
A query in multiple tables - by El Forum - 10-01-2008, 02:33 PM
A query in multiple tables - by El Forum - 10-01-2008, 04:33 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:17 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:38 PM
A query in multiple tables - by El Forum - 10-01-2008, 05:52 PM
A query in multiple tables - by El Forum - 10-01-2008, 08:42 PM
A query in multiple tables - by El Forum - 10-01-2008, 08:58 PM
A query in multiple tables - by El Forum - 10-01-2008, 09:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB