From 64fb261b87d861fff64ea3fcdd05f22d84124268 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 22 Jan 2009 03:22:55 -0800 Subject: [PATCH] simpler table creation function --- core/database.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/database.class.php b/core/database.class.php index 15bf2133..d6371a55 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -219,6 +219,12 @@ class Database { } } + public function create_table($name, $data) { + $data = str_replace($data, "SCORE_AIPK", $this->engine->auto_increment); + $ctes = $this->engine->create_table_extras; + $this->execute("CREATE TABLE $name ($data) $ctes"); + } + public function upgrade_schema($filename) { $this->install_schema($filename); }