数据以这种形式出现
Array
(
[User] => Array
(
[first_name] => sxsaxs
[last_name] => sdsdsd
[contact_no] => 9569908024
[address_1] => sdasd
[address_2] => dsdsdsd
[country_id] => 1
[state_id] => 1
[city_id] => 1
)
)
users_controller.php
public function my_account_edit(){
if(!empty($this->data))
{
$this->User->id = $this->Auth->user('id');
// echo $id= $this->User->id = $this->Auth->user('id'); it's working echo id
if($this->User->save($this->data['User']))
{
$this->Session->setFlash("Account has been saved");
$this->redirect(array('action' => 'my_account'));
}
}
但更新查询不起作用 where id = $this->Auth->user('id');
我没有得到我的代码中的问题所在