예제 #1
0
파일: Base.php 프로젝트: lerre/framework
 /**
  * Update multiple records matching the given criteria.
  *
  * @todo    replacements for bindvars
  * 
  * @see     Mad_Model_Base::updateAll()
  * @param   string  $set
  * @param   string  $conditions
  * @param   array   $bindVars
  * @return  void
  */
 protected function _updateAll($set, $conditions = null, $bindVars = null)
 {
     $setStr = $this->sanitizeSql($set, $bindVars);
     $conditionStr = $this->sanitizeSql($conditions, $bindVars);
     $conditionStr = !empty($conditions) ? "WHERE {$conditionStr} " : null;
     $sql = "UPDATE {$this->_tableName} " . "   SET {$setStr} " . $conditionStr;
     return $this->connection->update($sql, "{$this->_className} Update");
 }