0
내가 실행하고 쿼리에서 반환지고 배열상의 문제가도움이 서로
$jobs = array(
array('id'=>2,'salary'=>27000,'benefits'=>'false','benefits_description'=>'','skills'=>'PHP mysql javascript','job_summary'=>'Developing stuff','job_description'=>'Developing stuff','tags'=>'PHP, mysql, web development, web, leeds','created_at'=>1294871124,'updated_at'=>0,'job_titles_id'=>1,'locations_id'=>1,'employers_id'=>4,'id'=>1,'jobtitle'=>'Website Developer','id'=>1,'location'=>'Leeds')
);
나는 건물입니다 내 링크의 첫 번째 ID를 사용하고자하는, 그러나 2 대신 첫 번째 ID가 배열의 나중에 ID에 의해 덮어 쓰고 있다고 가정 할 때 1을 반환합니다? 이런 일을 막을 수있는 방법이
$this->db->select('*')
->from('jobs')
->join('job_titles', 'job_titles.id = jobs.job_titles_id', 'left')
->join('locations', 'locations.id = jobs.locations_id', 'left')
->where('jobs.employers_id', $employer_id);
$query = $this->db->get();
return $query->result_array();