Function ze\row::delete()

In PHP:
ze\row::delete(
$table, $ids, $multiple = true
)

Description

Deletes a row from a table in the database.

If page caching is in use on a site, the cache will be cleared depending on the tables or rows affected.

Parameters

$table

The name of a table. To meet our guidelines this should be one of your own Plugin's tables, as you may not directly modify a table belonging to another Plugin or the core.

$ids

An associative array of keys (column names) to values to search for; see Format of $id and $values for Database Functions for details.

$multiple

If multiple rows match, should the all be deleted? Defaults to true, but you may wish to set it to false as a safety catch.

Return Value

Returns the results of a mysqli_affected_rows() call.

Example

deleteRow(MY_ANIMAL_MANAGER_PREFIX. 'animals', array('name' => 'Chicken'));

Deletes a row from the animals table named "Chicken".