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

[eluser]earlyriser[/eluser]
It works now. Thanks for your help guys. The final code is:
Code:
$this->db->select('w.name, wc.rating');
$this->db->from('wines w');
$this->db->where('user_id', getUserProperty('id'));
$this->db->join('wine_comments wc','w.id = wc.wine_id');

$data['query']= $this->db->get();
$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