匿名用户

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)

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐