Welcome Guest, Not a member yet? Register   Sign In
Help with JOIN active record class
#3

[eluser]chefnelone[/eluser]
[quote author="WanWizard" date="1276706193"]Read up on the different types of JOINS. Wikipedia has a good article on them.

In this case, you need a left join:
Code:
$this->db->join('products_images', 'products_images.id_product = products.product_id', 'LEFT');

Note that all fields missing in the result (because there was no matching record to join) will have the value NULL. You'll have to test for this in your application.[/quote]
thanks wanwizard. will take a look at the wiki


Messages In This Thread
Help with JOIN active record class - by El Forum - 06-16-2010, 05:14 AM
Help with JOIN active record class - by El Forum - 06-16-2010, 05:36 AM
Help with JOIN active record class - by El Forum - 06-16-2010, 05:48 AM
Help with JOIN active record class - by El Forum - 09-02-2010, 12:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB