Skip to content

Instantly share code, notes, and snippets.

@Anass-ABEA
Created September 1, 2021 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anass-ABEA/9f40bc73eb614773c05bc4d0b7776351 to your computer and use it in GitHub Desktop.
Save Anass-ABEA/9f40bc73eb614773c05bc4d0b7776351 to your computer and use it in GitHub Desktop.
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