Это мой запрос:
Код: Выделить всё
public function get_all_expenses()
{
$this->db->select("*", 'category.name as cat_name');
$this->db->from('expense');
$this->db->join('category', 'expense.cat_id = category.id');
$this->db->join('users', 'expense.user_id = users.id');
$query = $this->db->get();
return $query;
}

Подробнее здесь: https://stackoverflow.com/questions/706 ... included-i
Мобильная версия