heaven123

pymysql.err.InternalError: (1054, "Unknown column 'user' in 'where clause'")

pymysql.err.InternalError: (1054, "Unknown column 'user' in 'where clause'")问题和解决方法

问题代码

sql="select * from user where name=%s"%a
把%s加上引号就可以了
name='nhy'
sql="select * from user where name='%s'"%name

posted on 2019-07-21 21:38  heaven123  阅读(2292)  评论(0)    收藏  举报

导航