Optimize All Tables In A MySQL Database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Optimize All Tables In A MySQL Database

    PHP Code:
    $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()); 
       } 
        

    copy paste from Optimize All Tables In A MySQL Database - Totally PHP
    Advertise your mobile site for FREE with AdTwirl

Working...
X