##获取数据表结构信息
--
1. 获取表结构信息
~~~php
#获取表结果: 返回数组 包含:fields, type,
db()->getTableInfo('tableName');
~~~
>[info]输出结果如下
~~~
array(4) {
["fields"] => array(4) {
[0] => string(2) "id"
[1] => string(6) "ipaddr"
[2] => string(8) "datetime"
[3] => string(4) "data"
}
["type"] => array(4) {
["id"] => string(7) "int(11)"
["ipaddr"] => string(8) "char(15)"
["datetime"] => string(8) "datetime"
["data"] => string(4) "text"
}
["bind"] => array(4) {
["id"] => int(1)
["ipaddr"] => int(2)
["datetime"] => int(2)
["data"] => int(2)
}
["pk"] => string(2) "id"
}
~~~