[php]/* disable autocommit */$mysqli->autocommit(FALSE);$mysqli->query(\"CREATE TABLE myCity LIKE City\");$mysqli->query(\"ALTER TABLE myCity Type=InnoDB\");$mysqli->query(\"INSERT INTO myCity SELECT * FROM City LIMIT 50\");/* commit insert */$mysqli->commit();[/php]注意出错后要用$mysqli->rollback();回滚 查看更多答案>>