Function __global->_helper_create_index

Definitions

sources/database_helper.php

  • Add an index to a table without disturbing the contents, after the table has been created.
  • 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 table name
$index_name ID_TEXT No No required parameter N/A N/A The index name
$fields array No No required parameter N/A N/A The fields
$unique_key_fields ?string No No Null N/A N/A Comma-separated names of the unique key field for the table (null: lookup)
$skip_fulltext_key_check boolean No No False N/A N/A Whether to skip checking if keys are appropriate for any auto-created fulltext indices

Preview

Code (PHP)

/**
 * Add an index to a table without disturbing the contents, after the table has been created.
 *
 * @param  object $this_ref Link to the real database object
 * @param  ID_TEXT $table_name The table name
 * @param  ID_TEXT $index_name The index name
 * @param  array $fields The fields
 * @param  ?string $unique_key_fields Comma-separated names of the unique key field for the table (null: lookup)
 * @param  boolean $skip_fulltext_key_check Whether to skip checking if keys are appropriate for any auto-created fulltext indices
 */

function _helper_create_index(object $this_ref, string $table_name, string $index_name, array $fields, ?string $unique_key_fields = null, bool $skip_fulltext_key_check = false)