kunitsuji
tsuji****@m-s*****
2008年 7月 11日 (金) 11:52:28 JST
kunitsujiです。
では表示させて確認しましょう。
>
>
>function edit($cu_id = '')
>{
> $edit = (int) $this->input->post('edit');
> if ($edit == 1)
> {
> $data = array(
> 'cu_name' => $this->input->post('cu_name'),
> 'cu_kana' => $this->input->post('cu_kana'),
> 'cu_tel' => $this->input->post('cu_tel'),
> 'cu_fax' => $this->input->post('cu_fax'),
> 'cu_mail' => $this->input->post('cu_mail'),
> 'biko' => $this->input->post('biko'),
> 'datetime'=> date('Y-m-d H:i:s', time()),
> );
//ここに
var_dump($data);
//をいれてdataの内容を確認してみる
> $cu_id = (int) $cu_id;
> $this->db->update('customer', $data, array('cu_id' =>
>$cu_id));
//ここにSQLを表示させてみる
echo $this->db->update_string('customer', $data, array
('cu_id' => $cu_id));
> $this->load->view('customer_edit_finished');
> }
> else
> {
こんな感じで状況を追いかければいいです。
なぜ更新されないのか?
正しく$dataが渡されているのかということですね。