I have a query that I use to get my data from two tables. How can I use the codeigniter active records "Join" instead of my query
public function get_categories($parent_id = 0) {
$query = $this->db->query("SELECT * FROM " . $this->db->dbprefix . "category c LEFT JOIN " . $this->db->dbprefix . "category_description cd ON (c.category_id = cd.category_id) WHERE c.status=1 and c.parent_id = '" . (int)$parent_id . "' order by sort_order");
return $query->result_array();
}
Question: What would be the best to convert it to codeigniter active records "Join" function.