21,886
社区成员
发帖
与我相关
我的任务
分享
function check_table($table){
require dirname(__FILE__) .'/connection.php';
mysql_select_db("news",$db);
$ret = mysql_query("SHOW TABLE STATUS WHERE `name` = '".$table."'");
while($row = mysql_fetch_array($ret)){
if($row['Engine']!='MyISAM'){
$wrong=1;
}
}
if($wrong){
mysql_query("REPAIR TABLE ".$table);
}
mysql_close($db);
$wrong=$ret=$row=NULL;
}
if($row["Collation"]=='in use'){
对吗?