Hello CakePHP!
I have a little problem on my code. I have this function that upon trigger
will activate and $id and change the status to "New". However, when doing
this - the application is always doing the "else" part "The order could not
be activated".
I am monitoring the SQL logs and no query has been executed only the desc on
the table. Debug 2 is also selected on core.php.
*How could I see why is this not working?*
> function activate($id = null)
> {
> $this->checkSession();
> if (!$id) {
> $this->Session->setFlash('Invalid Cancel Id request.');
> $this->redirect(array('action'=>'index'), null, true);
> }
> else
> {
> if ($this->Card->save($this->data)) {
> $CancelStatus = "New";
> $this->data['Card']['status'] = $CancelStatus;
> $this->Card->save($this->data);
> $this->Session->setFlash('The order is now active.');
> $this->redirect($this->referer());
> } else {
> $this->Session->setFlash('The order could not be activated.');
> $this->redirect($this->referer());
> }
> }
> }
>
Help!
--
Louie Miranda ([email protected])
http://www.louiemiranda.net
Security Is A Series Of Well-Defined Steps
chmod -R 0 / ; and smile :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---