forked from hussien89aa/PythonTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnaped.txt
More file actions
10 lines (10 loc) · 486 Bytes
/
snaped.txt
File metadata and controls
10 lines (10 loc) · 486 Bytes
1
2
3
4
5
6
7
8
9
10
db=sqlite3.connect("test.db")
db.row_factory = sqlite3.Row
db.execute("create table if not exists Admin(name text,age int)")
db.execute("insert into Admin (name,age) values (?, ?)",("hussein",27))
#db.execute('insert into Admin (name, age) values (?, ?)', (row['t1'], row['i1']))
print("hello from python")
print("next line execute")
cursor=db.execute("select * from Admin")
for row in cursor:
print(' {}: {}'.format(row['name'], row['age']))