php 修复表与优化数据表
//--------------------------修复表
function Ebak_Rep($tablename,$dbname){
global $empire;
$dbname=RepPostVar($dbname);
$empire->query("use `$dbname`");
$count=count($tablename);
if(empty($count))
{
printerror("EmptyChangeTb","history.go(-1)");
}
for($i=0;$i<$count;$i++)
{
$sql1=$empire->query("REPAIR TABLE `$tablename[$i]`;");
}
printerror("RepairTbSuccess","ChangeTable.php?mydbname=$dbname");
}
//--------------------------忧化表
function Ebak_Opi($tablename,$dbname){
global $empire;
$dbname=RepPostVar($dbname);
$empire->query("use `$dbname`");
$count=count($tablename);
if(empty($count))
{
printerror("EmptyChangeTb","history.go(-1)");
}
for($i=0;$i<$count;$i++)
{
$sql1=$empire->query("OPTIMIZE TABLE `$tablename[$i]`;");
}
printerror("OptimizeTbSuccess","ChangeTable.php?mydbname=$dbname");
}