Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
211 views
in Technique[技术] by (71.8m points)

Making a DB with sqlite

a code:

import sqlite3
blyad = sqlite3.connect('eb.db')
suka = blyad.cursor()
suka.execute('''CREATE TABLE blyads (
condoms text
duck integer
padla text)
''')
blyad.commit()
huj = [('podonok', 2, 'gad'), ('drislau', 3, 'bl')]
suka.executemany("INSERT INTO blyads VALUES (?, ?, ?)", huj)
suka.execute("SELECT * FROM blyadi")
print(suka.fetchall())

thus returns me an empty list, thus my executemany command seems to have failed, though the machine did not report an error. what's wrong? thank you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...