Function __global->_helper_create_table
Definitions
sources/database_helper.php
- Create a table with the given name and the given array of field name to type mappings.If a field type starts '*', then it is part of that field's key. If it starts '?', then it is an optional field.
- 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 |
| $fields | array | No | No | required parameter | N/A | N/A | The fields |
| $skip_size_check | boolean | No | No | False | N/A | N/A | Whether to skip the size check for the table (only do this for addon modules that don't need to support anything other than MySQL) |
| $skip_null_check | boolean | No | No | False | N/A | N/A | Whether to skip the check for NULL string fields |
| $save_bytes | ?boolean | No | No | False | N/A | N/A | Whether to use lower-byte table storage, with trade-offs of not being able to support all unicode characters; use this if key length is an issue (null: auto-detect if needed). Pass as true/false for normal install code to make intentions explicit, maintenance code may use auto-detect. |
| $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)
/**
* Create a table with the given name and the given array of field name to type mappings.If a field type starts '*', then it is part of that field's key. If it starts '?', then it is an optional field.
*
* @param object $this_ref Link to the real database object
* @param ID_TEXT $table_name The table name
* @param array $fields The fields
* @param boolean $skip_size_check Whether to skip the size check for the table (only do this for addon modules that don't need to support anything other than MySQL)
* @param boolean $skip_null_check Whether to skip the check for NULL string fields
* @param ?boolean $save_bytes Whether to use lower-byte table storage, with trade-offs of not being able to support all unicode characters; use this if key length is an issue (null: auto-detect if needed). Pass as true/false for normal install code to make intentions explicit, maintenance code may use auto-detect.
* @param boolean $skip_fulltext_key_check Whether to skip checking if keys are appropriate for any auto-created fulltext indices
*/
function _helper_create_table(object $this_ref, string $table_name, array $fields, bool $skip_size_check = false, bool $skip_null_check = false, ?bool $save_bytes = false, bool $skip_fulltext_key_check = false)
* Create a table with the given name and the given array of field name to type mappings.If a field type starts '*', then it is part of that field's key. If it starts '?', then it is an optional field.
*
* @param object $this_ref Link to the real database object
* @param ID_TEXT $table_name The table name
* @param array $fields The fields
* @param boolean $skip_size_check Whether to skip the size check for the table (only do this for addon modules that don't need to support anything other than MySQL)
* @param boolean $skip_null_check Whether to skip the check for NULL string fields
* @param ?boolean $save_bytes Whether to use lower-byte table storage, with trade-offs of not being able to support all unicode characters; use this if key length is an issue (null: auto-detect if needed). Pass as true/false for normal install code to make intentions explicit, maintenance code may use auto-detect.
* @param boolean $skip_fulltext_key_check Whether to skip checking if keys are appropriate for any auto-created fulltext indices
*/
function _helper_create_table(object $this_ref, string $table_name, array $fields, bool $skip_size_check = false, bool $skip_null_check = false, ?bool $save_bytes = false, bool $skip_fulltext_key_check = false)

