Browse Source

Import de bdd plus mieux.

master
klafyvel 8 years ago
committed by root
parent
commit
bea633782b
  1. 4
      import_bdd.py

4
import_bdd.py

@ -16,8 +16,8 @@ def process():
cur.execute('''drop table if exists players''')
cur.execute('''drop table if exists machines''')
print("create tables")
cur.execute('''create table players (id int,firstname text,name text, ban_end float)''')
cur.execute('''create table machines (id int,player_id int,ip text)''')
cur.execute('''create table players (id integer primary key auto_increment,firstname text not null,name text not null, ban_end double not null)''')
cur.execute('''create table machines (id int primary key auto_increment,player_id int not null,ip text not null)''')
print("select players")
cur.execute("""select id from players""")
players = cur.fetchall()

Loading…
Cancel
Save