Welcome Guest, Not a member yet? Register   Sign In
Trying to join two different IDs with AR
#4

[eluser]jcavard[/eluser]
You are joining twice the same table, but there is no need.
Try this instead...
Code:
$this->db->select('*');
$this->db->from('thug_client_projects p');
$this->db->join('thug_client_groups g', 'g.group_id = p.group_id', 'left');
$this->db->join('thug_client_companies c', 'c.group_id = p.group_id', 'left');
$this->db->get();

I like your table name... I am a thug too Big Grin


Messages In This Thread
Trying to join two different IDs with AR - by El Forum - 09-17-2009, 11:29 AM
Trying to join two different IDs with AR - by El Forum - 09-17-2009, 01:40 PM
Trying to join two different IDs with AR - by El Forum - 09-17-2009, 01:43 PM
Trying to join two different IDs with AR - by El Forum - 09-17-2009, 02:08 PM
Trying to join two different IDs with AR - by El Forum - 09-17-2009, 02:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB