#!/usr/bin/python
# -*- coding: utf-8 -*-
#mysqldb
import time, MySQLdb
#连接
conn=MySQLdb.connect(host="localhost",user="root",passwd="123456",db="test",charset="utf8")
cursor = conn.cursor()
file = open("2.txt","r")
i=0
#查询
n = cursor.execute("select * from user")
for row in cursor.fetchall():
str=file.readline()
str=str.strip('\n')
row_str=''
for r in row:
row_str=row_str+r
if (cmp(str,row_str) == 0):
# print "error, %s line is not same, file content is %s, mysql content is %s" % (i,str,row)
print "right, %s line is same, file content is %s, mysql content is %s" % (i,str,row_str)
i=i+1
file.close()
#删除
cursor.close()
#关闭
conn.close()
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
###########################################################################################
######
##########
#####################################################
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
mysql_read.rar (1个子文件)
mysql_read.py 761KB
共 1 条
- 1
钱亚锋
- 粉丝: 86
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0