fix #1134
This commit is contained in:
parent
71c1dcb236
commit
1177110a02
|
@ -583,7 +583,7 @@ data = c1.fetchall()
|
||||||
numOfRows = c1.rowcount
|
numOfRows = c1.rowcount
|
||||||
numOfCols = len(c1.description)
|
numOfCols = len(c1.description)
|
||||||
for irow in range(numOfRows):
|
for irow in range(numOfRows):
|
||||||
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])
|
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]))
|
||||||
|
|
||||||
# use the cursor as an iterator to retrieve all returned results
|
# use the cursor as an iterator to retrieve all returned results
|
||||||
c1.execute('select * from tb')
|
c1.execute('select * from tb')
|
||||||
|
|
|
@ -579,7 +579,7 @@ data = c1.fetchall()
|
||||||
numOfRows = c1.rowcount
|
numOfRows = c1.rowcount
|
||||||
numOfCols = len(c1.description)
|
numOfCols = len(c1.description)
|
||||||
for irow in range(numOfRows):
|
for irow in range(numOfRows):
|
||||||
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])
|
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]))
|
||||||
|
|
||||||
# 直接使用cursor 循环拉取查询结果
|
# 直接使用cursor 循环拉取查询结果
|
||||||
c1.execute('select * from tb')
|
c1.execute('select * from tb')
|
||||||
|
|
Loading…
Reference in New Issue