Monday, 19 August 2013

I'm trying to edit a column but rather than updating the colum a new column is being added to it

I'm trying to edit a column but rather than updating the colum a new
column is being added to it

i have a table named tasks in my database named cakephp1. i've written
this code in the controller: function edit($id = null) { if (!$id) {
$this->Session->setFlash('Invalid Task');
$this->redirect(array('action'=>'index'), null, true); } if
(empty($this->data)) { $this->data = $this->Task->find(array('id' =>
$id)); } else { if ($this->Task->updateAll(debug($this->data))){
$this->Session->setFlash('The Task has been saved');
$this->redirect(array('action'=>'index'), null, true); } else {
$this->Session->setFlash('The Task could not be saved. Please, try
again.');
} } }
i'm new to cakephp and this is my example which i am trying out.please do
help me out. wat can i do to make the colum be updated ?

No comments:

Post a Comment