Welcome Guest, Not a member yet? Register   Sign In
Compare data from two different tables using codeigniter
#3

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

You didn't mention what the problem was.

I assume you're having trouble with CodeIgniter escaping your SELECT clause? You can pass FALSE into $this->db->select() as the second parameter to prevent that.
Code:
$this->db->select('count(DISTINCT source)', FALSE);  
$this->db->from('comment c','evaluation e');  

$this->db->where('c.evaluation_id','e.id');
$this->db->where('e.department_id', $department_id);


Messages In This Thread
Compare data from two different tables using codeigniter - by El Forum - 05-24-2013, 01:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB