当前位置:网站首页>如何让数据库中的数据同步
如何让数据库中的数据同步
2022-08-10 01:20:00 【CSDN问答】
查询出来的数据能打印出来,数据库中的数据却没变化,怎么改
def select_now():
s1 = ey1.get()
if s1 != '':
conn = pymssql.connect('', 'sa', '', 'table')
cursor = conn.cursor()
sql_select = "SELECT * FROM [table].[dbo].[Table2] WHERE province=%s "
data=s1
cursor.execute(sql_select,data)
results=cursor.fetchall()
print(results)
cursor.close()
conn.close()
for i in map(treeview.delete, treeview.get_children("")):
pass
for i in range(min(len(province), len(area), len(number))): # 写入数据
treeview.insert('', i, values=(province[i], area[i], number[i]))
数据库的数据
1 河南 郑州 1
2 河北 石家庄 2
3 浙江 杭州 3
4 四川 重庆 4
14 湖北 武汉
打印出来的数据
[(1, '河南 ', '郑州 ', '1 ')]
边栏推荐
猜你喜欢

嵌入式Qt-实现两个窗口的切换

Shader Graph learns various special effects cases

C# rounding MidpointRounding.AwayFromZero

DALL·E-2是如何工作的以及部署自己的DALL·E模型

卷积神经网络识别验证码

什么是一网统管?终于有人讲明白了

Unity vertex animation

UI遍历的初步尝试

Not, even the volume of the king to write code in the company are copying and pasting it reasonable?

STM32F103驱动HCSR04超声波测距显示
随机推荐
高并发+海量数据下如何实现系统解耦?【下】
Initial attempt at UI traversal
Problems and solutions related to Chinese character set in file operations in ABAP
【Swoole系列3.5】进程池与进程管理器
2022金九银十工作潮,怎么样才能成功跳槽面试拿到高薪呢?
递归 二分查找 冒泡排序 快速排序
[网鼎杯 2020 青龙组]AreUSerialz
防勒索病毒现状分析
eyb:Redis学习(4)
【报错】ModuleNotFoundError: No module named ‘scp‘
彩色袜子题
跳房子游戏
web开发概述
首次在我们的centos上安装MySQL
微透镜阵列后光传播的研究
免费文档翻译软件电脑版软件
Solidity最强对手:MOVE语言及新公链崛起
万字总结:分布式系统的38个知识点
OpenSSF的开源软件风险评估工具:Scorecards
罗彻斯特大学 | 现在是什么序列?蛋白质序列的贝叶斯优化的预训练集成