Help with JOIN active record class

#1
[eluser]chefnelone[/eluser]
Hello

I'm using active records with JOIN in this way:
Code:
$this->db->join('products_images', 'products_images.id_product = products.product_id');
$products = $this->db->get('products');
$data['products'] = $products->result();

it works fine but the problem is:

let say I have 3 records in table 'products' with id_product: 1, 2 and 3
and 2 records in table 'products_images' with id_product: 1 and 2

When I get $data['products'] the record with id_products = 3 is missing. I can see that if the JOIN is not made the record is no added to the results.
Is there any way to get the record even if that doesn't exist in the 'products_images' table??


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.