1
我试图使用CakePHP计算后的意见,但使用此代码CakePHP的:将数据保存在一列
$this->autoRender=false;
$unformattedData = $this->GeneralNews->findById($id);
$data = $unformattedData['GeneralNews'];
$total = $data['views'];
$total = $total+1;
$this->GeneralNews->views =$total;
print_r($this->GeneralNews->views);
$this->GeneralNews->save($this->request->data);
的print_r的告诉我这是已经在桌子上的意见,节省不happinging添加到他们+1 ..但它从来没有保存在数据库中..有什么问题?