網站後台

"; $alltables = mysqli_query($link,"SHOW TABLES;"); // record the output $output = array(); while($table = mysqli_fetch_assoc($alltables)){ foreach($table as $db => $tablename){ $sql = 'OPTIMIZE TABLE '.$tablename.';'; $response = mysqli_query($link,$sql) or die(mysql_error()); $output[] = mysqli_fetch_assoc($response); }; }; // print output echo "
".print_r($output,true)."
"; ?>

優化資料庫資料表

導覽