MYSQL
MYSQL
Constants for database types
Select class
$db : \Pop\Db\Adapter\AbstractAdapter
Database object
$where : \Pop\Db\Sql\Where
WHERE predicate object
$having : \Pop\Db\Sql\Having
HAVING predicate object
setTable(mixed $table) : \Pop\Db\Sql\AbstractSql
Set the table
mixed | $table |
setAlias(string $alias) : \Pop\Db\Sql\AbstractSql
Set the alias
string | $alias |
setValues(array $values) : \Pop\Db\Sql\AbstractSql
Set the values
array | $values |
addValue(mixed $value) : \Pop\Db\Sql\AbstractSql
Add a value
mixed | $value |
addNamedValue(string $name, mixed $value) : \Pop\Db\Sql\AbstractSql
Add a named value
string | $name | |
mixed | $value |
__construct(\Pop\Db\Adapter\AbstractAdapter $db)
Constructor
Instantiate the SQL object
\Pop\Db\Adapter\AbstractAdapter | $db |
db() : \Pop\Db\Adapter\AbstractAdapter
Get the current database adapter object (alias method)
getDb() : \Pop\Db\Adapter\AbstractAdapter
Get the current database adapter object
setIdQuoteType(string $type = self::NO_QUOTE) : \Pop\Db\Sql\AbstractSql
Set the quote ID type
string | $type |
setPlaceholder(string $placeholder) : \Pop\Db\Sql\AbstractSql
Set the placeholder
string | $placeholder |
distinct(boolean $distinct = true) : \Pop\Db\Sql\Select
Select distinct
boolean | $distinct |
from(mixed $table) : \Pop\Db\Sql\Select
Set from table
mixed | $table |
asAlias(mixed $table) : \Pop\Db\Sql\Select
Set table AS alias name
mixed | $table |
join(mixed $foreignTable, array $columns, string $join = 'JOIN') : \Pop\Db\Sql\Select
Add a JOIN clause
mixed | $foreignTable | |
array | $columns | |
string | $join |
leftJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a LEFT JOIN clause
mixed | $foreignTable | |
array | $columns |
rightJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a RIGHT JOIN clause
mixed | $foreignTable | |
array | $columns |
fullJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a FULL JOIN clause
mixed | $foreignTable | |
array | $columns |
outerJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a OUTER JOIN clause
mixed | $foreignTable | |
array | $columns |
leftOuterJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a LEFT OUTER JOIN clause
mixed | $foreignTable | |
array | $columns |
rightOuterJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a RIGHT OUTER JOIN clause
mixed | $foreignTable | |
array | $columns |
fullOuterJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a FULL OUTER JOIN clause
mixed | $foreignTable | |
array | $columns |
innerJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a INNER JOIN clause
mixed | $foreignTable | |
array | $columns |
leftInnerJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a LEFT INNER JOIN clause
mixed | $foreignTable | |
array | $columns |
rightInnerJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a RIGHT INNER JOIN clause
mixed | $foreignTable | |
array | $columns |
fullInnerJoin(mixed $foreignTable, array $columns) : \Pop\Db\Sql\Select
Add a FULL INNER JOIN clause
mixed | $foreignTable | |
array | $columns |
where(mixed $where = null) : \Pop\Db\Sql\Select
Access the WHERE clause
mixed | $where |
andWhere(mixed $where = null) : \Pop\Db\Sql\Select
Access the WHERE clause with AND
mixed | $where |
orWhere(mixed $where = null) : \Pop\Db\Sql\Select
Access the WHERE clause with OR
mixed | $where |
having(mixed $having = null) : \Pop\Db\Sql\Select
Access the HAVING clause
mixed | $having |
andHaving(mixed $having = null) : \Pop\Db\Sql\Select
Access the HAVING clause with AND
mixed | $having |
orHaving(mixed $having = null) : \Pop\Db\Sql\Select
Access the HAVING clause with OR
mixed | $having |
groupBy(mixed $by) : \Pop\Db\Sql\Select
Set the GROUP BY value
mixed | $by |
orderBy(mixed $by, string $order = 'ASC') : \Pop\Db\Sql\Select
Set the ORDER BY value
mixed | $by | |
string | $order |
limit(mixed $limit) : \Pop\Db\Sql\Select
Set the LIMIT value
mixed | $limit |
offset(integer $offset) : \Pop\Db\Sql\Select
Set the OFFSET value
integer | $offset |