PHP & MySQL
Friday, November 18, 2011
Optimize the tables in a Database using PHP
$alltables = db_query("SHOW TABLES");
while ($tablename = db_result($alltables)) {
db_query("OPTIMIZE TABLE '".$tablename."'");
echo $tablename." optimized now";
}
echo 'All tables optimized successfully';
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment