我有麻烦在CakePHP中的控制器创建方法表中的更新我现有的行,任何人都可以建议我适当的模型方法在表更新的行该模型的方法来更新该行中的CakePHP
<?php
class UsersController extends AppController
{
public function update($id)
{
if(isset($_REQUEST['update']))
{
// method of model to update the row
}
else
$this->set('user',$this->User->find('first',array('conditions'=>array('id'=>$id))));
}
}
?>
读哪一个环节由您提供的教程后
阅读文档有帮助。 http://book.cakephp.org/2.0/en/models/saving-your-data.html做博客教程... – burzum