Aplus Framework Docs

Where

Trait Where.

Table of Contents

orWhere()  : static
Appends a "OR $column $operator ...$values" condition in the WHERE clause.
orWhereBetween()  : static
Appends a "OR $column BETWEEN $min AND $max" condition in the WHERE clause.
orWhereEqual()  : static
Appends a "OR $column = $value" condition in the WHERE clause.
orWhereGreaterThan()  : static
Appends a "OR $column > $value" condition in the WHERE clause.
orWhereGreaterThanOrEqual()  : static
Appends a "OR $column >= $value" condition in the WHERE clause.
orWhereIn()  : static
Appends a "OR $column IN (...$values)" condition in the WHERE clause.
orWhereIsNotNull()  : static
Appends a "OR $column IS NOT NULL" condition in the WHERE clause.
orWhereIsNull()  : static
Appends a "OR $column IS NULL" condition in the WHERE clause.
orWhereLessThan()  : static
Appends a "OR $column < $value" condition in the WHERE clause.
orWhereLessThanOrEqual()  : static
Appends a "OR $column <= $value" condition in the WHERE clause.
orWhereLike()  : static
Appends a "OR $column LIKE $value" condition in the WHERE clause.
orWhereMatch()  : static
Appends a "OR MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
orWhereMatchInBooleanMode()  : static
Appends a "OR MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
orWhereMatchWithQueryExpansion()  : static
Appends a "OR MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
orWhereNotBetween()  : static
Appends a "OR $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
orWhereNotEqual()  : static
Appends a "OR $column != $value" condition in the WHERE clause.
orWhereNotIn()  : static
Appends a "OR $column NOT IN (...$values)" condition in the WHERE clause.
orWhereNotLike()  : static
Appends a "OR $column NOT LIKE $value" condition in the WHERE clause.
orWhereNullSafeEqual()  : static
Appends a "OR $column <=> $value" condition in the WHERE clause.
where()  : static
Appends an "AND $column $operator ...$values" condition in the WHERE clause.
whereBetween()  : static
Appends an "AND $column BETWEEN $min AND $max" condition in the WHERE clause.
whereEqual()  : static
Appends an "AND $column = $value" condition in the WHERE clause.
whereGreaterThan()  : static
Appends an "AND $column > $value" condition in the WHERE clause.
whereGreaterThanOrEqual()  : static
Appends an "AND $column >= $value" condition in the WHERE clause.
whereIn()  : static
Appends an "AND $column IN (...$values)" condition in the WHERE clause.
whereIsNotNull()  : static
Appends an "AND $column IS NOT NULL" condition in the WHERE clause.
whereIsNull()  : static
Appends an "AND $column IS NULL" condition in the WHERE clause.
whereLessThan()  : static
Appends an "AND $column < $value" condition in the WHERE clause.
whereLessThanOrEqual()  : static
Appends an "AND $column <= $value" condition in the WHERE clause.
whereLike()  : static
Appends an "AND $column LIKE $value" condition in the WHERE clause.
whereMatch()  : static
Appends an "AND MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
whereMatchInBooleanMode()  : static
Appends an "AND MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
whereMatchWithQueryExpansion()  : static
Appends an "AND MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
whereNotBetween()  : static
Appends an "AND $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
whereNotEqual()  : static
Appends an "AND $column != $value" condition in the WHERE clause.
whereNotIn()  : static
Appends an "AND $column NOT IN (...$values)" condition in the WHERE clause.
whereNotLike()  : static
Appends an "AND $column NOT LIKE $value" condition.
whereNullSafeEqual()  : static
Appends an "AND $column <=> $value" condition in the WHERE clause.
renderWhere()  : string|null
Renders the full WHERE (or HAVING) clause.

Methods

orWhere()

Appends a "OR $column $operator ...$values" condition in the WHERE clause.

public orWhere(Closure|array<string|int, \Closure|array|string>|string $column, string $operator, Closure|array<string|int, \Closure|array|float|int|string|null>|float|int|string|null ...$values) : static
Parameters
$column : Closure|array<string|int, \Closure|array|string>|string

Closure for a subquery, a string with the column name or an array with column names on WHERE MATCH clause

$operator : string
$values : Closure|array<string|int, \Closure|array|float|int|string|null>|float|int|string|null
Return values
static

orWhereBetween()

Appends a "OR $column BETWEEN $min AND $max" condition in the WHERE clause.

public orWhereBetween(Closure|string $column, Closure|float|int|string|null $min, Closure|float|int|string|null $max) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$min : Closure|float|int|string|null
$max : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/between-and/
Return values
static

orWhereEqual()

Appends a "OR $column = $value" condition in the WHERE clause.

public orWhereEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/equal/
Return values
static

orWhereGreaterThan()

Appends a "OR $column > $value" condition in the WHERE clause.

public orWhereGreaterThan(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/greater-than/
Return values
static

orWhereGreaterThanOrEqual()

Appends a "OR $column >= $value" condition in the WHERE clause.

public orWhereGreaterThanOrEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/greater-than-or-equal/
Return values
static

orWhereIn()

Appends a "OR $column IN (...$values)" condition in the WHERE clause.

public orWhereIn(Closure|string $column, Closure|float|int|string|null $value, Closure|float|int|string|null ...$values) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
$values : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/in/
Return values
static

orWhereIsNotNull()

Appends a "OR $column IS NOT NULL" condition in the WHERE clause.

public orWhereIsNotNull(Closure|string $column) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

Tags
see
https://mariadb.com/kb/en/is-not-null/
Return values
static

orWhereIsNull()

Appends a "OR $column IS NULL" condition in the WHERE clause.

public orWhereIsNull(Closure|string $column) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

Tags
see
https://mariadb.com/kb/en/is-null/
Return values
static

orWhereLessThan()

Appends a "OR $column < $value" condition in the WHERE clause.

public orWhereLessThan(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/less-than/
Return values
static

orWhereLessThanOrEqual()

Appends a "OR $column <= $value" condition in the WHERE clause.

public orWhereLessThanOrEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/less-than-or-equal/
Return values
static

orWhereLike()

Appends a "OR $column LIKE $value" condition in the WHERE clause.

public orWhereLike(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/like/
Return values
static

orWhereMatch()

Appends a "OR MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.

public orWhereMatch(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

orWhereMatchInBooleanMode()

Appends a "OR MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.

public orWhereMatchInBooleanMode(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

orWhereMatchWithQueryExpansion()

Appends a "OR MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.

public orWhereMatchWithQueryExpansion(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

orWhereNotBetween()

Appends a "OR $column NOT BETWEEN $min AND $max" condition in the WHERE clause.

public orWhereNotBetween(Closure|string $column, Closure|float|int|string|null $min, Closure|float|int|string|null $max) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$min : Closure|float|int|string|null
$max : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-between/
Return values
static

orWhereNotEqual()

Appends a "OR $column != $value" condition in the WHERE clause.

public orWhereNotEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-equal/
Return values
static

orWhereNotIn()

Appends a "OR $column NOT IN (...$values)" condition in the WHERE clause.

public orWhereNotIn(Closure|string $column, Closure|float|int|string|null $value, Closure|float|int|string|null ...$values) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
$values : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-in/
Return values
static

orWhereNotLike()

Appends a "OR $column NOT LIKE $value" condition in the WHERE clause.

public orWhereNotLike(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-like/
Return values
static

orWhereNullSafeEqual()

Appends a "OR $column <=> $value" condition in the WHERE clause.

public orWhereNullSafeEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/null-safe-equal/
Return values
static

where()

Appends an "AND $column $operator ...$values" condition in the WHERE clause.

public where(Closure|array<string|int, \Closure|array|string>|string $column, string $operator, Closure|array<string|int, \Closure|array|float|int|string|null>|float|int|string|null ...$values) : static
Parameters
$column : Closure|array<string|int, \Closure|array|string>|string

Closure for a subquery, a string with the column name or an array with column names on WHERE MATCH clause

$operator : string
$values : Closure|array<string|int, \Closure|array|float|int|string|null>|float|int|string|null
Return values
static

whereBetween()

Appends an "AND $column BETWEEN $min AND $max" condition in the WHERE clause.

public whereBetween(Closure|string $column, Closure|float|int|string|null $min, Closure|float|int|string|null $max) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$min : Closure|float|int|string|null
$max : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/between-and/
Return values
static

whereEqual()

Appends an "AND $column = $value" condition in the WHERE clause.

public whereEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/equal/
Return values
static

whereGreaterThan()

Appends an "AND $column > $value" condition in the WHERE clause.

public whereGreaterThan(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/greater-than/
Return values
static

whereGreaterThanOrEqual()

Appends an "AND $column >= $value" condition in the WHERE clause.

public whereGreaterThanOrEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/greater-than-or-equal/
Return values
static

whereIn()

Appends an "AND $column IN (...$values)" condition in the WHERE clause.

public whereIn(Closure|string $column, Closure|float|int|string|null $value, Closure|float|int|string|null ...$values) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
$values : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/in/
Return values
static

whereIsNotNull()

Appends an "AND $column IS NOT NULL" condition in the WHERE clause.

public whereIsNotNull(Closure|string $column) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

Tags
see
https://mariadb.com/kb/en/is-not-null/
Return values
static

whereIsNull()

Appends an "AND $column IS NULL" condition in the WHERE clause.

public whereIsNull(Closure|string $column) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

Tags
see
https://mariadb.com/kb/en/is-null/
Return values
static

whereLessThan()

Appends an "AND $column < $value" condition in the WHERE clause.

public whereLessThan(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/less-than/
Return values
static

whereLessThanOrEqual()

Appends an "AND $column <= $value" condition in the WHERE clause.

public whereLessThanOrEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/less-than-or-equal/
Return values
static

whereLike()

Appends an "AND $column LIKE $value" condition in the WHERE clause.

public whereLike(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/like/
Return values
static

whereMatch()

Appends an "AND MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.

public whereMatch(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

whereMatchInBooleanMode()

Appends an "AND MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.

public whereMatchInBooleanMode(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

whereMatchWithQueryExpansion()

Appends an "AND MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.

public whereMatchWithQueryExpansion(Closure|array<string|int, \Closure|array|string>|string $columns, Closure|array<string|int, \Closure|array|string>|string $against) : static
Parameters
$columns : Closure|array<string|int, \Closure|array|string>|string

Columns to MATCH

$against : Closure|array<string|int, \Closure|array|string>|string

AGAINST expression

Tags
see
https://mariadb.com/kb/en/full-text-index-overview/
see
https://mariadb.com/kb/en/match-against/
Return values
static

whereNotBetween()

Appends an "AND $column NOT BETWEEN $min AND $max" condition in the WHERE clause.

public whereNotBetween(Closure|string $column, Closure|float|int|string|null $min, Closure|float|int|string|null $max) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$min : Closure|float|int|string|null
$max : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-between/
Return values
static

whereNotEqual()

Appends an "AND $column != $value" condition in the WHERE clause.

public whereNotEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-equal/
Return values
static

whereNotIn()

Appends an "AND $column NOT IN (...$values)" condition in the WHERE clause.

public whereNotIn(Closure|string $column, Closure|float|int|string|null $value, Closure|float|int|string|null ...$values) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
$values : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-in/
Return values
static

whereNotLike()

Appends an "AND $column NOT LIKE $value" condition.

public whereNotLike(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/not-like/
Return values
static

whereNullSafeEqual()

Appends an "AND $column <=> $value" condition in the WHERE clause.

public whereNullSafeEqual(Closure|string $column, Closure|float|int|string|null $value) : static
Parameters
$column : Closure|string

Closure for a subquery or a string with the column name

$value : Closure|float|int|string|null
Tags
see
https://mariadb.com/kb/en/null-safe-equal/
Return values
static

renderWhere()

Renders the full WHERE (or HAVING) clause.

protected renderWhere([string $clause = 'where' ]) : string|null
Parameters
$clause : string = 'where'

where or having

Return values
string|null

The full clause or null if has not a clause

Search results