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 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