This function return informations about table struct and registered keys, keyparts and more.
Prototype:
The function returns an array of associative data with many information about internal structure of table:
| Table data | |
|---|---|
| tbl_num_keys | number of key used in table |
| tbl_active_key | |
| tbl_node_size | size of index nodes |
| tbl_min_row_length | min length of record data |
| tbl_max_row_length | max length of record data |
| tbl_data_handle | |
| tbl_index_handle | |
| tbl_is_open | |
| tbl_open_mode | |
| tbl_varlen_length | |
| tbl_varlen_slot | |
| tbl_row_number | |
| tbl_dup_number | |
| tbl_row_start | |
| tbl_trans_last | |
| tbl_num_rows | number of records in dat file |
| tbl_varlen_node |
For each key in table the array is filled with more information about keypart structure (each key can be based on more fields of record data, so each key have a keypart data)
| Key data | |
|---|---|
| key_k_rootnode | root node for key |
| key_k_len | length of key |
| key_k_nparts | number of keyparts |
| Key part | |
|---|---|
| key_kp_start | start offset in data record |
| key_kp_len | length of data |
| key_kp_type | type of data ( see mfcdb_key for data types) |
RETURN: This function returns an nested array containing information data.
<?php $resource = mfcdb_open("mydatabase"); if($resource == FALSE) { die("An error occurred opening table, error is: ".mfcdb_error()."\n"); } $info = mfcdb_get_info($resource); echo "TABLE INFORMATION : \n".print_r($info, true)."\n"; if(mfcdb_close($resource) == FALSE) { die("An error occurred closing table, error is: ".mfcdb_error()."\n"); } ?>