Код: Выделить всё
function admin_profile()
{
$this->db->select('*');
$this->db->from('bk_users as A');
$this->db->join('bk_ctoe as B', 'A.ID=B.customer_id');
$this->db->join('bk_ctoe as C', 'A.ID=C.employee_id');
return $this->db
->get()
->result();
}
Код: Выделить всё
SELECT *
FROM `bk_users` as `A`
JOIN `bk_ctoe` as `B`
ON `A`.`ID`=`B`.`customer_id`
JOIN `bk_ctoe` as `C`
ON `A`.`ID`=`C`.`employee_id`

Подробнее здесь: https://stackoverflow.com/questions/456 ... deigniters
Мобильная версия