diff options
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r-- | engine/lib/database.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index c46d6023f..e1f007399 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -368,7 +368,17 @@ return false;
return $tables;
- }
+ } + + /** + * Run an optimize query on a mysql tables. Useful for executing after major data changes. + * + */ + function optimize_table($table) + { + $table = sanitise_string($table); + return update_data("optimize table $table"); + }
/**
* Get the last database error for a particular database link
|