我收到一条错误消息,提示“您的 SQL 语法有错误;请检查与您的 MariaDB 服务器版本相对应的手册以了解要使用的正确语法”我还是 codeigniter 的新手,目前我确实需要帮助,这是我一直在尝试应用的代码
function save() {
$reporter=$this->Settings_m->greporter();
$jabrik=$this->Settings_m->gjabrik();
$redpel=$this->Settings_m->gredpel();
$usertxt="";
if (in_array($this->session->userdata('ugroup'), $reporter )) {
$usertxt=",reporter=".$this->user.",reporter_time=now()";
}
if (in_array($this->session->userdata('ugroup'), $jabrik )) {
$usertxt=",jabrik=".$this->user.",jabrik_time=now()";
}
if (in_array($this->session->userdata('ugroup'), $redpel )) {
$usertxt=",redpel=".$this->user.",redpel_time=now()";
}
/* end for usertxt call */
if($this->input->post('pub') == 1){
if($this->input->post('tglpub') == "0000-00-00 00:00:00" || $this->input->post('tglpub') == ""){
$tgl=",publish_up=now()";
}else{
//$tgl = $this->input->post('tglpub');
$tgl = ",publish_up='".$this->input->post('tglpub')."'";
}
}else{
$tgl=",publish_up=''";
}
$title =str_replace('"',"'",$this->input->post('title'));
$query=" insert gis_news_items set "
.' title="' .$title.'"'
.",alias='" . $this->input->post('alias',true )."'"
.",introtext='". $this->input->post('content')."'"
.",fulltexts=' '"
.",catid=".$this->input->post('catid')
.",published=".$this->input->post('pub')
// .",hl=".$this->input->post('hl')
// .",focus=".$this->input->post('fcs')
}
慕容708150