【发布时间】:2014-08-11 06:00:39
【问题描述】:
我目前正在做一个学校项目。我需要更新表中的 GPS 坐标。我正在使用 Raspberry pi board、pyodbc、freeTds 和 sql 数据库。我无法连续更新多个项目..
cursor.execute("update Gps_table set longitude=(?) latitude=(?) where gps_id=1", s1, s2)
上面的代码不起作用..但我已经弄清楚了,当我一次只传递一个变量时它起作用了。这意味着下面的代码正在工作..
cursor.execute("update Gps_table set longitude=(?) where gps_id=1", s1)
cursor.execute("update Gps_table set latitude=(?) where gps_id=1", s2)
但我需要一次更新这两个参数。任何人都可以帮助我吗?感谢您阅读本文。。
【问题讨论】:
标签: python sql raspberry-pi pyodbc