Created
February 3, 2012 18:54
-
-
Save SeanPONeil/1731734 to your computer and use it in GitHub Desktop.
PHP Script for converting all tables in database to InnoDB engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$link = db_connect(); | |
$query = "SHOW tables"; | |
$result = mysql_query($query); | |
while($row = mysql_fetch_array($result)) | |
{ | |
$tbl = $row[0]; | |
$query = "ALTER TABLE $tbl ENGINE=INNODB"; | |
mysql_query($query); | |
} | |
mysql_close($link); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment