\Pop\Db\SqlUpdate

Update SQL class

Summary

Methods
Properties
Constants
__construct()
setSql()
getSql()
orderBy()
limit()
offset()
render()
where()
__get()
No public properties found
No constants found
No protected methods found
$columns
$sql
$orderBy
$limit
$offset
$where
N/A
No private methods found
No private properties found
N/A

Properties

$columns

$columns : array

SQL columns

Type

array

$orderBy

$orderBy : string

ORDER BY value

Type

string

$limit

$limit : mixed

LIMIT value

Type

mixed

$offset

$offset : integer

OFFSET value

Type

integer

Methods

__construct()

__construct(\Pop\Db\Sql  $sql, mixed  $columns = null) : \Pop\Db\Sql\AbstractSql

Constructor

Instantiate the SQL object.

Parameters

\Pop\Db\Sql $sql
mixed $columns

Returns

\Pop\Db\Sql\AbstractSql

getSql()

getSql() : \Pop\Db\Sql

Set the SQL object

Returns

\Pop\Db\Sql

orderBy()

orderBy(mixed  $by, string  $order = 'ASC') : \Pop\Db\Sql\AbstractSql

Set the ORDER BY value

Parameters

mixed $by
string $order

Returns

\Pop\Db\Sql\AbstractSql

limit()

limit(mixed  $limit) : \Pop\Db\Sql\AbstractSql

Set the LIMIT value

Parameters

mixed $limit

Returns

\Pop\Db\Sql\AbstractSql

offset()

offset(integer  $offset) : \Pop\Db\Sql\AbstractSql

Set the OFFSET value

Parameters

integer $offset

Returns

\Pop\Db\Sql\AbstractSql

render()

render() : string

Render the UPDATE statement

Returns

string

where()

where(mixed  $where = null) : \Pop\Db\Sql\Update

Set the WHERE clause

Parameters

mixed $where

Returns

\Pop\Db\Sql\Update

__get()

__get(string  $name) : mixed

Magic method to access $where property

Parameters

string $name

Throws

\Pop\Db\Sql\Exception

Returns

mixed