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

[eluser]Seppo[/eluser]
If you want to use ActiveRecord

Code:
$this->db->select('contractors.lname, contractors.fname, jobs.position, clients.companyName, jobs.current');
$this->db->from('jobs');
$this->db->join('contractors', 'jobs.contractor_id = contractors.id', 'inner');
$this->db->join('clients', 'jobs.company_id = clients.id', 'inner');
$this->db->where('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