i think u r not giving the relation of associate model
take this example to reffer

$this->PatientClinicalDetail->PatientClinicalDetailChemotherapy-
>deleteAll(array('PatientClinicalDetailChemotherapy.patient_clinical_detail_id'
=> $this->data['PatientClinicalDetail']['id']));

here code indicates parent table tends to child table
and then the id which data u wants to dlete.

ok

Anand
www.anshusys.com

On May 9, 4:07 pm, Jeremy Burns | Class Outfit
<[email protected]> wrote:
> I haven't used deleteAll, but according to the guide 
> (http://book.cakephp.org/view/1038/deleteAll) your conditions need to be in 
> SQL format, not Cake array format.
>
> Jeremy Burns
> Class Outfit
>
> [email protected]http://www.classoutfit.com
>
> On 9 May 2011, at 10:52, thom wrote:
>
>
>
>
>
>
>
> > Hello,,
>
> > I'd like to delete many record inside many tables.
> > I used $belongsTo in my Model. And in my Controller, I write this.
>
> > ###############
> > $this->Visit->deleteAll(array(
> >                    'Visit.id' => $id,
> >                    'History.visit_id' => $id,
> >                    'Recipe.visit_id' => $id,
> >                    'Diagnosi.visit_id' => $id,
> >                    'Expense.visit_id' => $id
> >            )
> >            );
> > $this->redirect($this->referer());
>
> > ##############
>
> > The problem is,, the deleteAll syntax is not affecting my database.
> > When I tried it, it just redirected back to the referer page and not
> > affected my database at all.
>
> > Is my code right?
>
> > Hope some one could help me. Thank you in advance..
>
> > --
> > Regards,,,
> > thom
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to