Saturday, December 17, 2011

Re: How to reference field on parent table from within delete function?

On Dec 17, 5:05 pm, Daniel <danwgr...@gmail.com> wrote:
> In the end I used the following code in the
> delete function:
>
> $this->Image->recursive = 1;
> if (($this->data['Gallery']['user_id'] == $this->Session->read('Auth.User.id')) || ($this->_isAdmin())) {
>
>         if ($this->Image->delete($id)) {
> ...
>

I could not get this to work so finally I used "find" and "contain".

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate