1
public function save_edit() {
parent::__save_edit();
$this->db = $this->load->database('default', true);
$this->load->model('product_model','',TRUE);
$id = $this->input->post('item_id');
$array_item = array(
'item_name' => $this->input->post('item_name'),
'note' => $this->input->post('item_note'),
'stock' => $this->input->post('item_stock'),
'price' => $this->input->post('item_price'),
'unit' => $this->input->post('item_unit')
);
$this->load->model('product_model');
$this->product_model->update($id,$array_item);
redirect('index.php/product');
}
public function edit(){
$this->db = $this->load->database('default', true);
$this->load->model('product_model');
**$data['product'] = $this->product_model->product($this->uri->segment(3))->row_array();**
$this->load->view('index.php/product_edit',$data);
}
エラーこのエラーコール::製品()
$data['product'] = $this->product_model->product($this->uri->segment(3))->row_array();
あなたの投稿は主にコードなので、詳細を追加してください。 –
製品モデルコードを表示します。アプリケーションに関連しないバージョンタグを編集して削除します。 – Tpojka
エラーがあなたに何を伝えているか把握するのに天才はかかりません。製品モデルにはプロダクトメソッドが含まれているか、プロダクトモデルにはありません。あなたは何を望んでいるのですか? –