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