sql = "INSERT INTO %s (%s) VALUES (%s)" val=(table, fields[:-1], values[:-1]) cursor.execute(sql, val) 我这边这么格式化参数对的.但是入库时报错 1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 请问是什么情况
1
sujin190 2018-08-21 13:57:27 +08:00
你把一个数组直接转成字符串扔给 mysql 运行肯定挂啊
|
2
blankme 2018-08-21 13:59:37 +08:00
|