Копируем структуру таблиц из developDB в testDB
<?php $pdo = new PDO(); $res = $pdo->exec("DROP DATABASE IF EXISTS `testDB`"); $res = $pdo->exec("CREATE DATABASE `testDB`"); $tables = $pdo->query("SHOW TABLES FROM `developDB`"); $tables = $tables->fetchAll(PDO::FETCH_COLUMN, 0); foreach ($tables as $table) { $res = $pdo->exec("CREATE TABLE `$table ` LIKE `developDB`.`$table`"); }