У меня есть детей_tb, и я ПРИСОЕДИНЯЮСЬ к ним Resident_tbl. Затем в Residents_tbl я создал представление с именем Family_head.
Можно ли использовать Family_head в другом операторе запроса JOIN для Children_tbl?
Текущий запрос
Код: Выделить всё
$query = $this->db->select('*');
$query = $this->db->from('children_tbl');
$query = $this->db->join('residents_tbl', 'residents_tbl.residentID=children_tbl.childName', 'full');
---> ***I want to add another join here for view (family_head)***
$query = $this->db->where('childName', $id);
$query = $this->db->order_by('childID', 'DESC');
$query = $this->db->get('');
Код: Выделить всё
$query = $this->db->join('family_head', 'family_head.residentID=children_tbl.familyHeadID', 'full');Код: Выделить всё
Table 'db_name.family_head' doesn't exist
CM.
Подробнее здесь: https://stackoverflow.com/questions/518 ... -statement
Мобильная версия