1
嗨,我想在codeigniter中使用ckeip jquery插件更新我的数据库中的现有数据。我能够更新数据库中的数据。但是当我刷新我的页面时,数据库字段再次显示零值。我不知道它是不是碰巧。尝试在数据库中使用ckeip和codeigniter更新数据
能否请你解释一下..如果我还有一个DIV使用ckeip比怎么样,我应该电话PHP脚本来更新所有该脚本
感谢
更新======== =========这里是我的模型代码==================
function get(){
$query = $this->db->select('content')->from('about')->where('id', 1)->get();
return $query->result();
}
function update_abx(){
$up_data = array('content' => $this->input->post('content'));
$this->db->where('id', 1);
$this->db->update('about', $up_data);
}
===== =============这里是我的控制器代码===============
function index(){
$data['paste'] = $this->test->get();
$this->load->view('index_view', $data);
}
function abc(){
$query = $this->test->update_abx();
$this->load->view('index_view');
}
==================这是我的看法文件代码================
<div id="editable" name="sample">
<?php
foreach($paste as $row){
echo $row->content;
}
?>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#editable').ckeip({
e_url: 'site/abc',
});
});// enf of the document ready function