Function DatabaseConnector->query_delete
Definitions
sources/database.php
- Deletes rows from the specified table, that match the specified conditions (if any). It may be limited to a row range (it is likely, only a maximum, of 1, will be used, if any kind of range at all).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$table | string | No | No | required parameter | N/A | N/A | The table name |
$where_map | array | No | No | [] | N/A | N/A | The WHERE map [will all be ANDed together] |
$end | string | No | No | Blank (empty string) | N/A | N/A | Something to tack onto the end of the statement |
$max | ?integer | No | No | Null | N/A | N/A | The maximum number of rows to delete (null: no limit) |
$start | integer | No | No | 0 | N/A | N/A | The starting row to delete |
$fail_ok | boolean | No | No | False | N/A | N/A | Whether to allow failure (outputting a message instead of exiting completely) |
Preview
Code (PHP)
/**
* Deletes rows from the specified table, that match the specified conditions (if any). It may be limited to a row range (it is likely, only a maximum, of 1, will be used, if any kind of range at all).
*
* @param string $table The table name
* @param array $where_map The WHERE map [will all be ANDed together]
* @param string $end Something to tack onto the end of the statement
* @param ?integer $max The maximum number of rows to delete (null: no limit)
* @param integer $start The starting row to delete
* @param boolean $fail_ok Whether to allow failure (outputting a message instead of exiting completely)
*/
public function query_delete(string $table, array $where_map = [], string $end = '', ?int $max = null, int $start = 0, bool $fail_ok = false)
* Deletes rows from the specified table, that match the specified conditions (if any). It may be limited to a row range (it is likely, only a maximum, of 1, will be used, if any kind of range at all).
*
* @param string $table The table name
* @param array $where_map The WHERE map [will all be ANDed together]
* @param string $end Something to tack onto the end of the statement
* @param ?integer $max The maximum number of rows to delete (null: no limit)
* @param integer $start The starting row to delete
* @param boolean $fail_ok Whether to allow failure (outputting a message instead of exiting completely)
*/
public function query_delete(string $table, array $where_map = [], string $end = '', ?int $max = null, int $start = 0, bool $fail_ok = false)