你现在能记得上一个问题了吗?
时间: 2023-08-14 10:03:51 浏览: 113
ASP技术常遇问题解答-如果没设置 DSN 也能建立数据库连接吗?.zip
当然,上一个问题是优化以下代码:
```python
sql = "select id from zhize_xiangmu_to_unit where id_zhize_xiangmu='{}'".format(idxm)
co.to_sql(sql)
jg = cs.fetchall()
for j in jg:
sql = "delete from luzhi_jilu_xijie where id_xiangmu_unit='{}'".format(j)
x = co.to_sql(sql)
sql = "delete from luzhi_jilu_all where id_zhize_xiangmu='{}'".format(j)
x = co.to_sql(sql)
conn.commit()
```
阅读全文