老師在不
$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);
}
你得看看報什麼錯 對症下***