summaryrefslogtreecommitdiff
path: root/installer/include.php
diff options
context:
space:
mode:
authormckenzierobotics.org <mckenzierobotics.org@zapp.tigertech.net>2011-09-05 14:46:23 -0700
committermckenzierobotics.org <mckenzierobotics.org@zapp.tigertech.net>2011-09-05 14:46:23 -0700
commitc81e480daaa233c35fec262e9907d35179db5e86 (patch)
tree29f270d41f03eabb8d5118ae3310caacc891a049 /installer/include.php
parent6e9d542022d612e5352e4ad4c8bf25bbea530c4a (diff)
(mostly) Fix the installer. We still need to set baseurl in the 'conf' table manually.
Diffstat (limited to 'installer/include.php')
-rw-r--r--installer/include.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/installer/include.php b/installer/include.php
index 7300e90..b7f7b19 100644
--- a/installer/include.php
+++ b/installer/include.php
@@ -79,3 +79,18 @@ function mm_mysql_table_exists($mysql, $table_name) {
$total = $total[0];
return $total>0;
}
+
+function mm_mysql_create_table($mysql, $table_name, $columns) {
+ $table_exists = mm_mysql_table_exists($mysql, $table_name);
+ if ($table_exists) {
+ return 0;
+ }
+ $query ="CREATE TABLE $table_name (\n";
+ $query.=implode(",\n ", $columns);
+ $query.="\n);";
+ $success = mysql_query($query);
+ if (!$success) {
+ return mysql_error($mysql);
+ }
+ return 1;
+}