时间:2021-07-01 10:21:17 帮助过:12人阅读
// display error is On for us to be notified if there's something wrong ini_set ( 'display_errors', 'On' ); error_reporting ( E_ALL ); // Config, change this variables $dbServer = "localhost"; $dbUser = "帐号"; $dbPass = "密码"; $dbName = $_GET['dbName']; // Set a connection for our database $link = mysql_connect ( $dbServer, $dbUser, $dbPass ) or die ( "unable to connect to msql server: " . mysql_error () ); // Select our database mysql_select_db ( $dbName, $link ) or die ( "unable to select database 'db': " . mysql_error () ); $result = mysql_query ( "show tables" ); if (! $result) { die ( 'query failed: ' ); } // Use while loop to convert all tables to MyISAM while ( $row = mysql_fetch_array ( $result ) ) { // Command Reference: ALTER TABLE tableName ENGINE=MyISAM echo "ALTER TABLE " . $row [0] . " ENGINE=MyISAM; ".' mysql_query ( "ALTER TABLE " . $row [0] . " ENGINE=MyISAM; " ); } ?>
// display error is On for us to be notified if there's something wrong ini_set ( 'display_errors', 'On' ); error_reporting ( E_ALL ); // Config, change this variables $dbServer = "localhost"; $dbUser = "帐号"; $dbPass = "密码"; // Set a connection for our database $link = mysql_connect ( $dbServer, $dbUser, $dbPass ) or die ( "unable to connect to msql server: " . mysql_error () ); $result = mysql_query ( "show databases;" ); if (! $result) { die ( 'query failed: ' ); } // Use while loop to convert all tables to MyISAM while ( $row = mysql_fetch_array ( $result ) ) { echo '.$row[0].'">'.$row[0].' } ?>
|