do I need to name my action as delete() right now its called deletegroup(). 
because in the same admin controller i will deleting groups, users, permissions 
etc.. The url looks like this:

 

http://localhost/cake/admins/deletegroup/id

 

controller: admins

action: deletegroup

parameter: id

 

Thanks,

Bharani
 
> Date: Fri, 22 May 2009 18:04:01 -0400
> Subject: Re: Database Record deletion problem
> From: [email protected]
> To: [email protected]
> 
> 
> What's the URL in your links? Normally, the action would benamed
> delete() or admin_delete().
> 
> As an aside, you should probably put that code inside an if block:
> 
> if ($this->Group->del($id)
> {
> $this->redirect(...)
> }
> 
> On Fri, May 22, 2009 at 6:14 AM, lakers fan <[email protected]> wrote:
> > Hello,
> >     I have a page with list of groups and along with each item there is a
> > link to delete that group.  But deletion is not working.. here is the code
> >
> >  function deletegroup($id)
> >  {
> >   $this->Group->del($id);
> >   $this->redirect(array('action' =>'groups'));
> >  }
> >
> > when I move the mouse over the delete link, i see proper id value.. if i use
> > the id to delete that record in phpmyadmin, it succeeds.. The Group object
> > is valid too..  Am i missing anything?
> >
> > Thanks,
> > Bharani
> >
> > ________________________________
> > Windows Liveā„¢: Keep your life in sync. Check it out.
> > >
> >
> 
> > 

_________________________________________________________________
HotmailĀ® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to