[eluser]blu3ness[/eluser]
I'm trying to do an old fashion select from two tables
in plain SQL it'll prob be something like this
Code:
SELECT a.title, a.desc,b.title as cat_title,b.desc as cat_desc
FROM products a, categories b
WHERE a.category_id = b.id
How would you accomplish this using activerecord?
I tried
Code:
$this->db->select('*')->from('products')->where('category_id',$category_id)->join('categories','products.category_id=categories.id');
which only gets me the first table data and nothing from the second.
Tyvm