码迷,mamicode.com
首页 >  
搜索关键字:fetchone    ( 84个结果
db相关
1. 游标的executescript,execuemany 查询结果的 fetcachall,fetchone,fetchmanyimport sqlite3conn=sqlite3.connect('D:/test.db')c=conn.cursor()sql='''create table i...
分类:数据库   时间:2015-08-13 13:47:52    阅读次数:163
PYTHON-mysql fetchall和 fetchone之间的区别
[root@zabbix_server ~]# cat aa.py import MySQLdbconn=MySQLdb.connect(host='ip',user='xxx',passwd='xxx',port=xxx,db='xxxx',charset='utf8')cursor =conn....
分类:数据库   时间:2015-08-10 19:36:11    阅读次数:322
请用心敲,不要复制
程序这东西 ,比如Python用数据库这两句话 cur = handle_71.cursor( MySQLdb.cursors.DictCursor) cur.execute(sql) result = cur.fetchone() 我曾今每天复制,每天复制,复制了 一年后 ,我还是自己写不出来。 今天我自己敲了...
分类:其他好文   时间:2015-05-22 11:41:40    阅读次数:121
dstat mysql5-conn
在/usr/shared/dstat目录下dstat_mysql5_conn.py中的部分源代码c = self.db.cursor()c.execute("""show global variables like 'max_connections';""")max = c.fetchone()c....
分类:数据库   时间:2014-07-22 22:51:36    阅读次数:252
84条   上一页 1 ... 7 8 9
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!