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 ..但它從來沒有保存在數據庫中..有什麼問題?