min() static public method

Gets the minimum value in a column of a table
static public min ( string $table, string $column, mixed $where = null ) : mixed
$table string The table name
$column string The name of the column
$where mixed Either a key/value array as AND connected where clause or a simple MySQL where clause string
return mixed
Ejemplo n.º 1
0
 public function testMin()
 {
     $this->assertEquals(1, db::min('users', 'id'));
 }