Back
This following code will help you with that:
<?php // connect your database here first // // Actual code starts here $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database_name' AND ENGINE = 'MyISAM'"; $rs = mysql_query($sql); while($row = mysql_fetch_array($rs)) { $tbl = $row[0]; $sql = "ALTER TABLE `$tbl` ENGINE=INNODB"; mysql_query($sql); } ?>
Are you interested to learn SQL in detail? Sign up for this perfect SQL Training course by Intellipaat.
31k questions
32.8k answers
501 comments
693 users