老师在不
$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);
}
你得看看报什么错 对症下***