From fcfe1a24590f4909506fd06b5c92186433ddb906 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 24 Jun 2008 20:23:18 +0000 Subject: Caching the show_db_tables function git-svn-id: https://code.elgg.org/elgg/trunk@1114 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/database.php b/engine/lib/database.php index 74d6d2d77..d908bf725 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -305,6 +305,12 @@ */ function get_db_tables() { global $CONFIG; + static $tables, $count; + + if (isset($tables)) { + return $tables; + } + $result = get_data("show tables"); $tables = array(); -- cgit v1.2.3