From 35b8e7c28d2654828d56e6edba1697dc7144be97 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 19 Sep 2003 11:58:24 +0000 Subject: [PATCH] Database needs prefix --- mod/attendance/db/mysql.php | 7 +++---- mod/attendance/version.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mod/attendance/db/mysql.php b/mod/attendance/db/mysql.php index 200780936c7..280f4c67ee9 100644 --- a/mod/attendance/db/mysql.php +++ b/mod/attendance/db/mysql.php @@ -6,10 +6,9 @@ function attendance_upgrade($oldversion) { global $CFG; - if ($oldversion < 2003091801) { - - execute_sql("ALTER TABLE `attendance` ADD `edited` TINYINT( 1 ) DEFAULT '0' NOT NULL;"); - execute_sql("UPDATE `attendance` set `edited` = 1;"); + if ($oldversion < 2003091802) { + execute_sql("ALTER TABLE `{$CFG->prefix}attendance` ADD `edited` TINYINT( 1 ) DEFAULT '0' NOT NULL;"); + execute_sql("UPDATE `{$CFG->prefix}attendance` set `edited` = 1;"); } return true; diff --git a/mod/attendance/version.php b/mod/attendance/version.php index fe8d5cd4f65..4016a22f386 100644 --- a/mod/attendance/version.php +++ b/mod/attendance/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2003091801; // The current module version (Date: YYYYMMDDXX) +$module->version = 2003091802; // The current module version (Date: YYYYMMDDXX) $module->cron = 0; // Period for cron to check this module (secs) ?>