From 8ef828ecab98ab7c6975514881e9e58d12dc8455 Mon Sep 17 00:00:00 2001 From: FatihMalakci Date: Mon, 1 Jul 2019 06:24:30 +0300 Subject: [PATCH] database wip --- database.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index 130b529..228925c 100644 --- a/database.py +++ b/database.py @@ -1,3 +1,18 @@ import sqlite3 -conn = sqlite3.connect('users.db') \ No newline at end of file +conn = sqlite3.connect('users.db') +c = conn.cursor() + + +#Creating our table. +c.execute('''CREATE TABLE users + (name,sirname,age,phone number)''') + +# Inserting an example user. +c.execute("INSERT INTO users VALUES('Fatih','Malakçı','24','5419768923')") + +#Saving +conn.commit() + +#Closing +conn.close() \ No newline at end of file