Function __global->table_id_locking_start
Definitions
sources/lang.php
- Start locking and get faux auto-increment ID for inserting into a table which uses simulated auto-increments due to its need for additional compounded keys. Used alongside table_id_locking_end.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $db | object | No | No | required parameter | N/A | N/A | Database connector to use |
| &$id | ?integer | Yes | No | required parameter | N/A | N/A | ID number (returned by reference) (null: just do normal auto-increment) |
| &$lock | boolean | Yes | No | required parameter | N/A | N/A | Whether locking has happened (returned by reference) |
| $table | string | No | No | translate | N/A | N/A | Translate table |
| $id_field | string | No | No | id | N/A | N/A | ID field |
Preview
Code (PHP)
/**
* Start locking and get faux auto-increment ID for inserting into a table which uses simulated auto-increments due to its need for additional compounded keys. Used alongside table_id_locking_end.
*
* @param object $db Database connector to use
* @param ?integer $id ID number (returned by reference) (null: just do normal auto-increment)
* @param boolean $lock Whether locking has happened (returned by reference)
* @param string $table Translate table
* @param string $id_field ID field
*/
function table_id_locking_start(object $db, ?int &$id, bool &$lock, string $table = 'translate', string $id_field = 'id')
* Start locking and get faux auto-increment ID for inserting into a table which uses simulated auto-increments due to its need for additional compounded keys. Used alongside table_id_locking_end.
*
* @param object $db Database connector to use
* @param ?integer $id ID number (returned by reference) (null: just do normal auto-increment)
* @param boolean $lock Whether locking has happened (returned by reference)
* @param string $table Translate table
* @param string $id_field ID field
*/
function table_id_locking_start(object $db, ?int &$id, bool &$lock, string $table = 'translate', string $id_field = 'id')

