src/Leevel/Database/Mysql.php
public function tableNames(string $dbName, $master = false): array
    {
        $sql = 'SHOW TABLES FROM '.$this->normalizeTableOrColumn($dbName);

        $result = [];

        if (($tables = $this->query($sql, [], $master, PDO::FETCH_ASSOC))) {
            foreach ($tables as $v) {
                $result[] = reset($v);
            }
        }

        unset($tables, $sql);

        return $result;
    }
public function tableNames(string $dbName, $master = false): array
    {
        $sql = 'SHOW TABLES FROM '.$this->normalizeTableOrColumn($dbName);

        $result = [];

        if (($tables = $this->query($sql, [], $master, PDO::FETCH_ASSOC))) {
            foreach ($tables as $v) {
                $result[] = reset($v);
            }
        }

        unset($tables, $sql);

        return $result;
    }
取得数据库表名列表.

@param string   $dbName
@param bool|int $master

@return array