Пример #1
0
 /**
  * Selects min value of some field by some predefined condition.
  *
  * @return int Number of records.
  */
 public function min()
 {
     $query = "SELECT min(`" . $this->field . "`) FROM " . $this->dbObject->getTableName();
     if ($this->conditions != "") {
         $query .= " WHERE " . $this->conditions;
     }
     return DBCore::selectSingleValue($query);
 }