Example #1
0
 /**
  * Delete this object from the database by specified criteria
  *
  * @param   rdbms.SQLExpression criteria
  * @return  int number of affected rows
  * @throws  rdbms.SQLException in case an error occurs
  */
 public function doDelete(SQLExpression $criteria)
 {
     $db = $this->getConnection();
     // Send it
     return $db->delete('from %c%c', $this->table, $criteria->toSQL($db, $this));
 }