exec("CREATE TABLE user (id_user INTEGER PRIMARY KEY, username TEXT NOT NULL UNIQUE, password TEXT)"); $db->exec("CREATE TABLE message (id_msg INTEGER PRIMARY KEY, id_user INT, content TEXT NOT NULL, FOREIGN KEY (id_user) REFERENCES user (id_user))"); }