안녕하세요. codeigniter에서 ckeip jquery 플러그인을 사용하여 데이터베이스의 기존 데이터를 업데이트하려고합니다. 데이터베이스에서 내 데이터를 업데이트 할 수 있습니다. 하지만 내 페이지를 새로 고칠 때 데이터베이스 필드는 다시 0 값을 표시합니다. 난 그게 뭔지 몰라서 일어난다. 데이터베이스의 ckeip 및 codeigniter를 사용하여 데이터를 업데이트하려고 시도했습니다.
당신은 그 설명시겠습니까 .. 내가 다른 사업부가 있다면 내가 전화의 PHP 스크립트는이 특정 스크립트를감사
를 업데이트하는 방법보다 ckeip를 사용하여 업데이트 할 ======== ========= 여기에이 ===== 내 모델 코드 ==================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