With CakePHP, you can remove multiple records from a database table using the deleteAll() model method. deleteAll() Usage $this -> Model -> deleteAll($conditions, $cascade = true); Lets say that you wanted to remove all the records for a specific user from the Item model. Below is a quick example. deleteAll() Example $this -> Item -> deleteAll(array(‘Item.user_id’ => 13)); …where 13 would [...]
Continue reading...
Thursday, September 20, 2007
1 Comment