继续收到此错误“ sqlite3.OperationalError:无此类列:”
import _sqlite3
connection = _sqlite3.connect("IDTag.db")
IdSql = connection.cursor()
IDs = input('What is your ID?')
names = input("What is your name?")
surnames = input("What is your Surname?")
SqlIN= 'INSERT INTO idtags (ID,Name,Surname) VALUES ('+ IDs + ','+ names + ','+ surnames + ');'
print(SqlIN)
IdSql.execute(SqlIN)
这是我执行.py
时的结果
What is your ID?2
What is your name?jon
What is your Surname?harp
INSERT INTO idtags (ID,Name,Surname) VALUES (2,jon,harp);
Traceback (most recent call last):
File "/home/mrfluffy/data/IdReader.py", line 15, in <module>
IdSql.execute(SqlIN)
sqlite3.OperationalError: no such column: jon
任何人都对事先要感谢的东西有任何想法