Skip to content

Instantly share code, notes, and snippets.

@malcomio
Created May 1, 2016 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malcomio/dbe0d006b32d7bfc5ac63d1761c930ee to your computer and use it in GitHub Desktop.
Save malcomio/dbe0d006b32d7bfc5ac63d1761c930ee to your computer and use it in GitHub Desktop.
<?php
// your connection
mysql_connect("localhost","root","root");
mysql_select_db("d6");
// convert
$result = mysql_query("SHOW TABLES");
while ($row = mysql_fetch_array($result)) {
foreach ($row as $key => $table) {
$query = "ALTER TABLE " . $table . " ENGINE=InnoDB;";
mysql_query($query);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment