your correct, but nothing much i can do with 512ram of memory on a heavy site
$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());
echo $tablename." Opmizide<br />";
}
foreach ($table as $db => $tablename)
{
mysql_query("REPAIR TABLE '".$tablename."'")
or die(mysql_error());
echo $tablename." Repaired<br />";
}
}
Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.