共计 249 个字符,预计需要花费 1 分钟才能阅读完成。
public function test(){
$dataList = Db::query("SELECT * FROM information_schema.TABLES AS t WHERE TABLE_SCHEMA = 'siyuan.me' AND TABLE_TYPE = 'BASE TABLE'");
$str = [];
foreach ($dataList as $item) {
$str[] = 'ALTER TABLE '. $item['table_name'] . ' ENGINE=InnoDB; ';
}
echo join('', $str);
}
正文完