Welcome Guest, Not a member yet? Register   Sign In
Joins and error handling
#2

[eluser]davidbehler[/eluser]
Just change
Code:
$this->db->join('master_charges', 'master_property_details.property_id = master_charges.property_id');
$this->db->join('master_contactdetails', 'master_property_details.property_id = master_contactdetails.property_id');
to
Code:
$this->db->join('master_charges', 'master_property_details.property_id = master_charges.property_id', 'left outer');
$this->db->join('master_contactdetails', 'master_property_details.property_id = master_contactdetails.property_id', 'left outer');

That way your join will be an outer join and return results even though master_charges or master_contactdetails is empty.


Messages In This Thread
Joins and error handling - by El Forum - 07-20-2009, 01:43 AM
Joins and error handling - by El Forum - 07-20-2009, 02:10 AM
Joins and error handling - by El Forum - 07-20-2009, 02:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB