Created
September 1, 2021 02:10
-
-
Save Anass-ABEA/9f40bc73eb614773c05bc4d0b7776351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
conn = sqlite3.connect("database.db") | |
curs = conn.cursor() | |
curs.execute("CREATE TABLE users(id INTEGER PRIMARY KEY, login TEXT, password TEXT, nom TEXT,prenom TEXT, type INTEGER, spes INTEGER, prix INTEGER, max Integer)") | |
curs.execute("CREATE TABLE appoitnments(id INTEGER PRIMARY KEY, id_med INTEGER, id_pat INTEGER, date_app DATE, state INTEGER, motif TEXT)") | |
res = curs.execute("INSERT INTO users values (1,'m','password', 'Amine', 'Alami',0,0,300, 10)") | |
res = curs.execute("INSERT INTO users values (2,'m1','password', 'Yousef', 'Alami',0,1,310, 10)") | |
res = curs.execute("INSERT INTO users values (3,'m2','password', 'Ibrahim', 'Alami',0,2,330, 10)") | |
res = curs.execute("INSERT INTO users values (4,'p','password', 'Ilias', 'Amani',1,NULL,NULL,NULL)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment