Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread Thomas Ploch
http://book.cakephp.org/de/view/1038/deleteAll If you look at the method definition, you see that the conditions don't have to be wrapped into an array with an 'conditions' key. $this->ProjectModule->UsersModule->deleteAll($delCond['conditions']); should do the

Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread sathyashrayan
Thanks for the answer.. I did try your solution $delCond['conditions'] = array('projects_id'=> $projects_id,'project_modules_id'=>$projectModuleID); $this->ProjectModule->UsersModule->deleteAll($delCond); I am getting these error.. SQL Error: 1054: Unknown column 'conditions' in 'where clause' [

Re: Simple deleteAll() yet I am stuck..

2011-10-04 Thread Thomas Ploch
Hello, 1.) When posting a problem to the group, especially database related problems, posting the "some mysql error" is vital for us to help you. 2.) You are overwriting the conditions array in line 2 of your example: Try this instead (the 'AND' behavior

Simple deleteAll() yet I am stuck..

2011-10-04 Thread sathyashrayan
This is the query for deleting multiple row. $query = "DELETE FROM users_modules WHERE projects_id='$projects_id' AND project_modules_id='$projectModuleID'"; I tried this $delCond['conditions'] = array('projects_id'=>$projects_id); $delCond['conditions'] = array('AND'=>array('project_modules_id'