Is it because my controller name is : AdminsController that things are not 
working?. Right now addition of records to database works but not deletion.  
Will the deletion of records work if I change the controller to say 
ManageController?.I just want a controller to add, edit and delete records from 
database. 
 
> Date: Sat, 23 May 2009 13:46:40 -0400
> Subject: Re: Database Record deletion problem
> From: [email protected]
> To: [email protected]
> 
> 
> It looks like you've fallen into the same trap that I have in the
> past: trying to use an AdminsController to do all admin stuff. I found
> that it became a real pain very quickly. I know that, with Cake, it
> can be very confusing to create an "admin section" for your site.
> 
> Anyway, I think you're far better off just linking to your
> GroupsController for this, calling admin_delete(). You can still have
> a main admin page, just point links to your other controllers in order
> to list, edit, delete, etc.
> 
> On Sat, May 23, 2009 at 2:00 AM, lakers fan <[email protected]> wrote:
> > 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