Welcome Guest, Not a member yet? Register   Sign In
HOw do I write this join correctly using CI
#3

[eluser]mironcho[/eluser]
Try something like this:
Code:
$this->db->select('contractors.lname, contractors.fname, jobs.`position`, clients.companyName, jobs.current');
$this->db->from('jobs');
$this->db->join('contractors', 'contractors.id = jobs.contractor_id', 'inner');
$this->db->join('clients', 'clients.id = jobs.company_id', 'inner');
$this->db->where(array('jobs.current' => 'Yes'));
$query = $this->db->get();


Messages In This Thread
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 12:28 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 12:55 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 12:56 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 12:57 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 01:13 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 01:14 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 05:15 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 06:33 PM
HOw do I write this join correctly using CI - by El Forum - 03-29-2008, 06:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB