Delete class
This class holds all the information regarding DELETE operation, that will be used by Database class.
Example
$deleteOperation = new Delete('User');
$deleteOperation->where('id', '=', '1');
$deleteOperation->exec();
| package |
Default |
|---|
__construct(string $table) : void
stringName of the database table where the DELETE operation will happen
exec() : boolean
Execute the constructed DELETE operation
boolean
toString() : string
Return the SQL query
Example
$deleteOperation = new Delete('User');
$deleteOperation->where('id', '=', '1');
echo $deleteOperation->toString();
// Returns "DELETE FROM User WHERE id = '1'"string
where(string $column, string $operator, string $value = '') : \TinyORM\Delete
Add where condition in this DELETE operation
stringName of the database table column
stringSQL operator =, <, >, <> etc
stringValue to the compared with the value in $column and $operator
\TinyORM\Delete
table : string
| var |
Database table |
|---|
string
where : array
| var |
Where |
|---|
array