Use the static update
method to create an UPDATE
statement builder.
use WTFramework\SQL\SQL;
$stmt = SQL::update();
Use the table
method to set the table name.
$stmt->table('t1');
$stmt->table(['t1', 't2']);
As table names are not automatically escaped you may use an alias.
$stmt->table('t1 AS t2');
If an array of table names is passed then any string key will be used as the alias.
$stmt->table(['t2' => 't1']);
A Table
service class can also be passed, providing a fluent interface for generating table names.
$stmt->table(SQL::table('t1'));
See Select documentation.
See Insert documentation.
See Select documentation.
See Select documentation.
See Select documentation.
See Select documentation.
See Select documentation.
See Select documentation.
See Insert documentation.
$stmt->lowPriority();
$stmt->ignore();
$stmt->forPortionOf($period, $from, $to);
$stmt->whereCurrentOf($cursor);
$stmt->orReplace();
$stmt->orFail();
$stmt->orIgnore();
$stmt->orRollBack();
See Select documentation.
See Select documentation.
See Select documentation.
See Select documentation.
See Select documentation.