匿名用户
1级
2013-03-27 回答
php 不会。
mysql 里面, 查询 表的信息, 我倒是会的。
是从 information_schema.tables 这里查询的。
下面是一个例子:
mysql> SELECT table_name, table_type, engine
-> FROM information_schema.tables
-> WHERE table_schema = 'test'
-> ORDER BY table_name DESC;
-> //
+--------------------+------------+--------+
| table_name | table_type | engine |
+--------------------+------------+--------+
| v_sale_report_x | VIEW | NULL |
| v_sale_report | VIEW | NULL |
| union_tab_2 | BASE TABLE | InnoDB |
| union_tab_1 | BASE TABLE | InnoDB |
| test_trigger_table | BASE TABLE | InnoDB |
| test_tab2 | BASE TABLE | InnoDB |
| test_tab | BASE TABLE | InnoDB |
| test_main | BASE TABLE | InnoDB |
| test_dysql | BASE TABLE | InnoDB |
| test_create_tab4 | BASE TABLE | InnoDB |
| test_create_tab2 | BASE TABLE | InnoDB |
| test_create_tab1 | BASE TABLE | InnoDB |
| test_create_tab | BASE TABLE | InnoDB |
| sale_report | BASE TABLE | InnoDB |
| log_table | BASE TABLE | InnoDB |
+--------------------+------------+--------+
15 rows in set (0.02 sec)