medoo::max PHP Method

max() public method

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

Usage Example

Esempio n. 1
0
 /**
  * @param      $table
  * @param      $column
  * @param null $where
  * @return int
  */
 public function max($table, $column, $where = NULL)
 {
     if (empty($this->_reader)) {
         return $this->_writer->max($table, $column, $where);
     } else {
         return $this->_reader->max($table, $column, $where);
     }
 }
All Usage Examples Of medoo::max