[eluser]IamPrototype[/eluser]
For my news system I need to display the given news and its categorie so I guess I'd have to use JOIN. I've looked through some code from different CI apps and this is what I've come up with so far.
Code:
$this->db->select('news.*, categories.title AS category_title, categories.slug AS category_slug');
$this->db->join('categories', 'news.category_id' = categories.id', 'left');
$query = $this->db->get('news');
I know what the code is doing, except for one thing, the third parameter in my join (left). What is the code doing when it's left? I know the options can be left, right, outer, inner, left outer, and right outer. But what it does.. I couldn't find it anywhere? Could anybody be nice and explain for me, please?
BTW! When I've to show the category data from my get, I'd just go like I always do? Like this:
Code:
<?php foreach($news as $single) : ?>
<?php anchor('controller/method/slug', $single->category_slug);
<?php endforeach; ?>
Right?

Sorry, just learning how to join atm, because I haven't done it before and sorry for my english, it isn't my native language (self taught

)