如何知道CI数据库操作语句状态
$data = array('site_name' => $this->input->post('site_name'),
'keywords' => $this->input->post('keywords'),
'title_keywords' => $this->input->post('title_keywords'),
'copyright' => $this->input->post('copyright'),
'descript' => $this->input->post('descript'),
'telephone' => $this->input->post('telephone'),
'cell_phone' => $this->input->post('cell_phone'),
'email' => $this->input->post('email')
);
$this->db->update('options', $data, 'id = 1');
我如何判断 $this->db->update('options', $data, 'id = 1');语句是否操作成功?
return ($this->db->affected_rows() > 0) ? TRUE : FALSE; 小凡 发表于 2011-8-23 15:56 static/image/common/back.gif
return ($this->db->affected_rows() > 0) ? TRUE : FALSE;
感谢您的帮助!!!{:1_1:} 学习了,,,,
页:
[1]