smf_db_table_structure
Description
Gets and returns information about the structure of the specified table
Syntax
array smf_db_table_structure (string $table_name[, array $parameters])
Parameter $table_name
Expected type: String
Description: The name of the table we want to get the structure for
Parameter $parameters
Expected type: Array
Description: An array of parameters
Array Elements of $parameters | |||
Key | Optional | Expected type | Description |
no_prefix | no | Boolean | If true, SMF won't add the db_prefix to the table name. |
Return value
Expected type: Array
Description: Info about the table's structure
Array Elements | |||
Key | Optional | Expected type | Description |
columns | no | Array of arrays | Info about the columns in the table. Each array contains information about a particular column. See smf_db_list_columns for more details. |
indexes | no | Array of arrays | Info about the indexes in the table. Each array contains information about a specific index. See smf_db_list_indexes for more details. |
name | no | String | The table name (with the db_prefix appended unless $parameters['no_prefix'] is true) |
Notes
- Returns an array with three keys
- Calls $smcFunc['db_list_columns'] to get column info
- Calls $smcFunc['db_list_indexes'] to get index info