0

I am new in cakephp. I'm trying to update a field record but one field is not updating. What is wrong with my code? Code is below:

if (!empty($data['psetting_id'])) {
  $data = array('id' => $data['id'], 'psetting_id' => $data['psetting_id'], 'custom_package_id' => 0);
}
$this->PackageCustomer->save($data);

When I print this array then view information below :

enter image description here

From this array the following field is being updated: custom_package_id but psetting_id is not being updated.

Abdus Sattar Bhuiyan
  • 3,016
  • 4
  • 38
  • 72
Omar Faruk
  • 298
  • 5
  • 19
  • you should check step by step debugging. specially before save command – tarikul05 Mar 24 '17 at 18:08
  • Try to check using debug($this->validationErrors); die(); if action save fails, as suggested in this answer http://stackoverflow.com/a/2314865/421063 Then update the OP with the output – marcocassisa Mar 24 '17 at 23:15

0 Answers0