Thank you for all your help!
Miles yes you are right about, I should not call the save twice.
CakePHP SQL query...
407 Query UPDATE `orderlists` SET `status` =
'New' WHERE `orderlists`.`id` = 123
It is now working!
--
Louie Miranda ([email protected])
http://www.louiemiranda.net
Security Is A Series Of Well-Defined Steps
chmod -R 0 / ; and smile :)
On Tue, Jan 13, 2009 at 10:15 AM, Miles J <[email protected]> wrote:
>
> Is this method within the Model or Controller.
>
> If its in the model, $this->Card should be $this->.
>
> You also cannot call save twice, try this:
>
> > function activate($id = null)
> > {
> > $this->checkSession();
> > if (!$id) {
> > $this->Session->setFlash('Invalid Cancel Id request.');
> > $this->redirect(array('action'=>'index'), null, true);
> > }
> > else
> > {
> $CancelStatus = "New";
> > $this->data['Card']['status'] = $CancelStatus;
> > if ($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());
> > }
> > }
> > }
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---