增加 optimize:schema 命令 用于生成 数据表字段信息缓存

This commit is contained in:
thinkphp
2016-09-18 17:01:55 +08:00
parent 09598e67b3
commit 2b476fe7ff
5 changed files with 67 additions and 7 deletions

View File

@@ -86,6 +86,7 @@ class Mysql extends Connection
*/
public function getTables($dbName = '')
{
$this->initConnect(true);
$sql = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES ';
// 调试开始
$this->debug(true);