SPHPlayground API
SPHPlayground
sphplayground sphplayground

Deleting records

The DELETE SQL statement removes one or more records from a table. A subset may be defined for deletion using a condition, otherwise all records are removed.Some database management systems, like MySQL, allow deletion of rows from multiple tables with one DELETE statement. relational database.[1]

The Delete object removes one or more records from a table. A subset may be defined for deletion using conditions defined dy using Delete::where(), otherwise all records are removed.

Synopsis
interface Delete implements ConditionalQuery
Sets the table from where the data is to be deleted
public from(string $table):static
Sets the WHERE clause
public resetWhere(?Where $where = null):static
Adds rules to the WHERE conditions component and returns the WHERE clause
public where(Predicate|string ... $rules):Where
Returns the parameter handler
public getParams():ParameterHandler
Returns the generated SQL language string
public __toString():string
Checks the basic validity of the SQL language generated
public isValid():bool