From 4669a3e824915d3c8418de1f6b17a6811441c617 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 31 Oct 2008 10:33:20 +0000 Subject: Closes #493: Moved database queries out of module and in to core in line with best practice. git-svn-id: https://code.elgg.org/elgg/trunk@2369 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engine/lib/database.php') 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 -- cgit v1.2.3