AndWhere
extends BaseBuilder
in package
implements
SQLStatementInterface
SQL AND
Tags
Interfaces, Classes, Traits and Enums
- SQLStatementInterface
- Contract for the custom SQL modules
Table of Contents
- ALL = '*'
- AND = ' AND '
- ASC = 'ASC'
- BKTK = '`'
- CLPAR = ')'
- COMMA = ','
- COUNT = 'COUNT'
- DBLQT = '"'
- DELETE = 'DELETE '
- DESC = 'DESC'
- EMPTY = ''
- EQUALS = ' = '
- FALSE = 'FALSE'
- FROM = ' FROM '
- GROUP_BY = ' GROUP BY '
- INNER = ' INNER'
- INSERT = 'INSERT '
- JOIN = 'JOIN '
- LEFT = ' LEFT'
- LIKE = ' LIKE '
- LIMIT = ' LIMIT'
- NOT = ' <>'
- OFFSET = ' OFFSET'
- ON = ' ON '
- ONE = 1
- OPPAR = '('
- OR = ' OR '
- OR_NOT = ' OR NOT '
- ORDER_BY = ' ORDER BY '
- OUTER = ' OUTER'
- PERC = '%'
- PRD = '.'
- RIGHT = ' RIGHT'
- SELECT = 'SELECT'
- SEPARATOR = ', '
- SGLQT = "'"
- SPC = ' '
- TRUE = 'TRUE'
- UPDATE = 'UPDATE '
- VALUE = '`?`'
- WHERE = ' WHERE '
- ZERO = 0
- columns() : string
- COLUMNS
- contains() : string
- count() : string
- COUNT
- from() : string
- FROM
- join() : string
- like() : string
- limit() : string
- LIMIT
- offset() : string
- OFFSET
- select() : string
- SELECT
- statement() : string
- SQL Statement string
- values() : string
- VALUES
- where() : string
- decrement() : int
- Decrement a value
- doubleQuote() : string
- Add double quotes to a string
- increment() : int
- Increment a value
- singleQuote() : string
- Add single quotes to a string
- strip() : string
- Strip a string of quotes
Constants
ALL
protected
mixed
ALL
= '*'
AND
protected
mixed
AND
= ' AND '
ASC
protected
mixed
ASC
= 'ASC'
BKTK
protected
mixed
BKTK
= '`'
CLPAR
protected
mixed
CLPAR
= ')'
COMMA
protected
mixed
COMMA
= ','
COUNT
protected
mixed
COUNT
= 'COUNT'
DBLQT
protected
mixed
DBLQT
= '"'
DELETE
protected
mixed
DELETE
= 'DELETE '
DESC
protected
mixed
DESC
= 'DESC'
EMPTY
protected
mixed
EMPTY
= ''
EQUALS
protected
mixed
EQUALS
= ' = '
FALSE
protected
mixed
FALSE
= 'FALSE'
FROM
protected
mixed
FROM
= ' FROM '
GROUP_BY
protected
mixed
GROUP_BY
= ' GROUP BY '
INNER
protected
mixed
INNER
= ' INNER'
INSERT
protected
mixed
INSERT
= 'INSERT '
JOIN
protected
mixed
JOIN
= 'JOIN '
LEFT
protected
mixed
LEFT
= ' LEFT'
LIKE
protected
mixed
LIKE
= ' LIKE '
LIMIT
protected
mixed
LIMIT
= ' LIMIT'
NOT
protected
mixed
NOT
= ' <>'
OFFSET
protected
mixed
OFFSET
= ' OFFSET'
ON
protected
mixed
ON
= ' ON '
ONE
protected
mixed
ONE
= 1
OPPAR
protected
mixed
OPPAR
= '('
OR
protected
mixed
OR
= ' OR '
OR_NOT
protected
mixed
OR_NOT
= ' OR NOT '
ORDER_BY
protected
mixed
ORDER_BY
= ' ORDER BY '
OUTER
protected
mixed
OUTER
= ' OUTER'
PERC
protected
mixed
PERC
= '%'
PRD
protected
mixed
PRD
= '.'
RIGHT
protected
mixed
RIGHT
= ' RIGHT'
SELECT
protected
mixed
SELECT
= 'SELECT'
SEPARATOR
protected
mixed
SEPARATOR
= ', '
SGLQT
protected
mixed
SGLQT
= "'"
SPC
protected
mixed
SPC
= ' '
TRUE
protected
mixed
TRUE
= 'TRUE'
UPDATE
protected
mixed
UPDATE
= 'UPDATE '
VALUE
protected
mixed
VALUE
= '`?`'
WHERE
protected
mixed
WHERE
= ' WHERE '
ZERO
protected
mixed
ZERO
= 0
Methods
columns()
COLUMNS
public
static columns(array<string|int, mixed> $columns) : string
Parameters
- $columns : array<string|int, mixed>
Return values
string —contains()
public
static contains(string $field, mixed $value) : string
Parameters
- $field : string
- $value : mixed
Return values
string —count()
COUNT
public
static count([mixed $values = self::ALL ]) : string
Parameters
- $values : mixed = self::ALL
Return values
string —from()
FROM
public
static from([string $table = null ]) : string
Parameters
- $table : string = null
Return values
string —join()
public
static join(string $params, array<string|int, mixed> $on) : string
Parameters
- $params : string
- $on : array<string|int, mixed>
Return values
string —like()
public
static like(string $pattern[, bool $not = false ]) : string
Parameters
- $pattern : string
- $not : bool = false
Return values
string —limit()
LIMIT
public
static limit(int $rows) : string
Parameters
- $rows : int
Return values
string —offset()
OFFSET
public
static offset(int $count) : string
Parameters
- $count : int
Return values
string —select()
SELECT
public
static select(string $columns[, bool $space = false ]) : string
Parameters
- $columns : string
- $space : bool = false
Return values
string —statement()
SQL Statement string
public
statement(string $table, mixed ...$params) : string
Parameters
- $table : string
- $params : mixed
Tags
Return values
string —values()
VALUES
public
static values(array<string|int, mixed> $values) : string
Parameters
- $values : array<string|int, mixed>
Return values
string —where()
public
static where(string $columns) : string
Parameters
- $columns : string
Return values
string —decrement()
Decrement a value
protected
static decrement(int $value) : int
Parameters
- $value : int
Return values
int —doubleQuote()
Add double quotes to a string
protected
static doubleQuote(string $string) : string
Parameters
- $string : string
Return values
string —increment()
Increment a value
protected
static increment(int $value) : int
Parameters
- $value : int
Return values
int —singleQuote()
Add single quotes to a string
protected
static singleQuote(string $string) : string
Parameters
- $string : string
Return values
string —strip()
Strip a string of quotes
protected
static strip(string $string) : string
Parameters
- $string : string