knrt.net
当前位置:首页 >> Python操作mysql报错:1064, "You hAvE An Error i... >>

Python操作mysql报错:1064, "You hAvE An Error i...

temp = gui.value() cur.execute('insert into userinfo values(%s,%s,%s)',temp[0],temp[1],temp[2])

SQL语句写的不对,cur.executemany("insert into test(name,age) values ('"+values[person_a]+"','"+values[person_b]+"')")

编码的话要看你py文件的编码和读取文件的编码 a=1b=10f=''.join(open("C:\\Users\\Administrator\\Desktop\\ID.txt").readlines()[a:b])print f 你第一行就基本写对了,就是list切片index只能是整形或空

网站首页 | 网站地图
All rights reserved Powered by www.knrt.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com