老师在不
$title = trim(input('post.title'));
$site = $this->db->table('sites')->where(array('names'=>'site'))->item();
if(!$site){
$this->db->table('sites')->insert(array('names'=>'site','values'=>json_encode($title)));
}else{
$value['values'] = json_encode($title);
$this->db->table('sites')->where(array('names'=>'site'))->update($value);
}
You have to see what error is reported and treat it accordingly***