私は次のようなmysqlクエリを持っています:
SELECT * FROM ms_project_log
INNER JOIN ms_project ON ms_project_log.iwo_no = ms_project.iwo_no
WHERE ms_project_log.iwo_no = '0007/NMS/BOTM/01/12'
ORDER BY ms_project_log.log_date DESC
codeigniterアクティブレコードに変換する方法は?
私は次のようなmysqlクエリを持っています:
SELECT * FROM ms_project_log
INNER JOIN ms_project ON ms_project_log.iwo_no = ms_project.iwo_no
WHERE ms_project_log.iwo_no = '0007/NMS/BOTM/01/12'
ORDER BY ms_project_log.log_date DESC
codeigniterアクティブレコードに変換する方法は?
これがあなたのためのコードです
$this->db->select('*');
$this->db->from('ms_project_log');
$this->db->join('ms_project','ms_project_log.iwo_no=ms_project_iwo_no', 'inner');
$this->db->where(ms_project_log.iwo_no, '0007/NMS/BOTM/01/12');
$this->db->order_by("ms_project_log.log_date", "desc");
$this->db->get();