Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 1.67 KB

delete.md

File metadata and controls

84 lines (66 loc) · 1.67 KB

What the Framework?! SQL

Delete

Use the static delete method to create a DELETE statement builder.

use WTFramework\SQL\SQL;

$stmt = SQL::delete();

From

See Select documentation.

Using

Use the using method to set the table names to use.

$stmt->using('t1');
$stmt->using(['t1', 't2']);


As table names are not automatically escaped you may use an alias.

$stmt->using('t1 AS t2');


If an array of table names is passed then any string key will be used as the alias.

$stmt->using(['t2' => 't1']);


A Table service class can also be passed, providing a fluent interface for generating table names.

$stmt->using(SQL::table('t1'));

Table

See Update documentation.

Join

See Select documentation.

Where

See Select documentation.

Order by

See Select documentation.

Limit

See Select documentation.

Offset

See Select documentation.

Top

See Select documentation.

Returning

See Insert documentation.

Miscellaneous methods

$stmt->lowPriority();
$stmt->quick();
$stmt->ignore();
$stmt->history();
$stmt->forPortionOf($period, $from, $to);
$stmt->beforeSystemTime($time);
$stmt->whereCurrentOf($cursor);

CTEs

See Select documentation.

If ... else ...

See Select documentation.

Explain

See Select documentation.

Set statement

See Select documentation.

When

See Select documentation.