2 $db->query('CREATE TABLE IF NOT EXISTS students
3 (mnumber int, firstname string, lastname string, email string, password string, blackboard int DEFAULT 0, lastblackboard TIMESTAMP, PRIMARY KEY (mnumber))');
4 $db->query('CREATE TABLE IF NOT EXISTS workdone
5 (mnumber int, session int, manydone int, thisdone string, tstamp TIMESTAMP)');
6 $db->query('CREATE TABLE IF NOT EXISTS prefs
7 (key string, value string, PRIMARY KEY (key))');
8 $db->query('CREATE TABLE IF NOT EXISTS sessions
9 (id int NOT NULL, examples string, nexamples int, PRIMARY KEY (id))');
10 $db->query('CREATE TABLE IF NOT EXISTS exams
11 (id int NOT NULL, score string, PRIMARY KEY (id))');
12 $db->query('CREATE TABLE IF NOT EXISTS examscore
13 (mnumber int, exam int, scorestr string, tstamp TIMESTAMP)');