sqlite3.OperationalError:没有这样的列:错误

时间:2019-06-14 15:21:12

标签: python sqlite

继续收到此错误“ 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

任何人都对事先要感谢的东西有任何想法

0 个答案:

没有答案