예제 #1
0
파일: Base.php 프로젝트: lerre/framework
 /**
  * Delete multiple records by the given conditions
  *
  * @todo    replacements for bindvars
  * 
  * @see     Mad_Model_Base::deleteAll()
  * @param   string  $conditions
  * @param   array   $bindVars
  */
 protected function _deleteAll($conditions = null, $bindVars = null)
 {
     $conditionStr = $this->sanitizeSql($conditions, $bindVars);
     $conditionStr = !empty($conditions) ? "WHERE {$conditionStr} " : null;
     $sql = "DELETE FROM {$this->_tableName} {$conditionStr}";
     return $this->connection->delete($sql, "{$this->_className} Delete");
 }