Function __global->_helper_change_primary_key
Definitions
sources/database_helper.php
- Change the primary key of a table.Note: this function cannot initialise a new AUTO key, use add_auto_key for that.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $this_ref | object | No | No | required parameter | N/A | N/A | Link to the real database object |
| $table_name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the table to create the index on |
| $new_key | array | No | No | required parameter | N/A | N/A | A list of fields to put in the new key |
Preview
Code (PHP)
/**
* Change the primary key of a table.Note: this function cannot initialise a new AUTO key, use add_auto_key for that.
*
* @param object $this_ref Link to the real database object
* @param ID_TEXT $table_name The name of the table to create the index on
* @param array $new_key A list of fields to put in the new key
*/
function _helper_change_primary_key(object $this_ref, string $table_name, array $new_key)
* Change the primary key of a table.Note: this function cannot initialise a new AUTO key, use add_auto_key for that.
*
* @param object $this_ref Link to the real database object
* @param ID_TEXT $table_name The name of the table to create the index on
* @param array $new_key A list of fields to put in the new key
*/
function _helper_change_primary_key(object $this_ref, string $table_name, array $new_key)

