<?php
dbConnect(); // Database connection
$alltables = mysql_query("SHOW TABLES");
while ($table = mysql_fetch_assoc($alltables)){
foreach ($table as $db => $tablename){
mysql_query("OPTIMIZE TABLE '".$tablename."'") or die(mysql_error());
}
}php优化mysql数据库的所有表的代码
阅读:5705 输入:2015-11-16 09:01:04