我遇到了一个奇怪的问题
设置为:Python3.6.5和sqlite3
我正在数据库中运行一个简单查询,假设“c
”是我的游标对象:
c.execute("select count from mydb where bytes is ?",(myvariable,))
这绝对可以,但如果我要添加“>;”对它
c.execute("select count from mydb where bytes is > ?",(myvariable,))
我得到以下错误:
OperationalError: near ">": syntax error
这在python 2.7中运行得非常好
如果你能帮我,我将不胜感激
问候,
哈利
目前没有回答
相关问题 更多 >
编程相关推荐