X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/8db41c98817b1b48532dc3cebf4bea166e42bb70..17e62c4bb73a987b44853d7b07a86c2b14160bda:/include/db.inc?ds=sidebyside diff --git a/include/db.inc b/include/db.inc index 3612374..f3d1804 100644 --- a/include/db.inc +++ b/include/db.inc @@ -1,14 +1,7 @@ query('CREATE TABLE IF NOT EXISTS students - (mnumber int, firstname string, lastname string, email string, password string, blackboard int DEFAULT 0, PRIMARY KEY (mnumber))'); - $db->query('CREATE TABLE IF NOT EXISTS workdone - (mnumber int, session int, manydone int, thisdone string)'); - $db->query('CREATE TABLE IF NOT EXISTS prefs - (key string, value string, PRIMARY KEY (key))'); - $db->query('CREATE TABLE IF NOT EXISTS sessions - (id int NOT NULL, examples string, nexamples int, PRIMARY KEY (id))'); + if ($db = new PDO('sqlite:admin/banane.db')) { + require 'dbscheme.inc'; } } ?>