Это мой код:
Код: Выделить всё
$this->db->select('competition_registration.permenent_registration_number');
$this->db->from('competition_registration');
$where = "permenent_registration_number is NOT NULL";
$this->db->where($where);
$this->db->join('competition_schedule', 'competition_schedule.competition_schedule_id = competition_registration.competition_schedule_id');
$this->db->join('competition_schedule', 'competition_schedule.period_id = 6');
$this->db->join('competition_schedule', 'competition_schedule.competition_level_id = 3');
$query = $this->db->get();
echo $this->db->last_query();
exit;
Я хочу выбрать столбцы из обеих таблиц с одинаковым конкурентным_расписанием и конкурентным_уровнем_идентификатором, равным 3, и period_id, равным 6, из таблицы конкурентного_расписания.
Подробнее здесь: https://stackoverflow.com/questions/513 ... odeigniter
Мобильная версия