I would like to know how I can create a function that, when a disable button is clicked for a record, it changes an active column’s specific value to 0. it should be located under [‘Album’][‘active’] which would by default be a 1. I tried
if ($id) { $this ->data[$id]['Album']['active'] = 0;
$this->Album->save($this->data);
Thanks
Try this functions :