medoo::min PHP Method

min() public method

public min ( $table, $join, $column = null, $where = null )
    public function min($table, $join, $column = null, $where = null)
    {
        $query = $this->query($this->select_context($table, $join, $column, $where, 'MIN'));
        if ($query) {
            $min = $query->fetchColumn();
            return is_numeric($min) ? $min + 0 : $min;
        } else {
            return false;
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @param      $table
  * @param      $column
  * @param null $where
  * @return int
  */
 public function min($table, $column, $where = NULL)
 {
     if (empty($this->_reader)) {
         return $this->_writer->min($table, $column, $where);
     } else {
         return $this->_reader->min($table, $column, $where);
     }
 }