diff --git a/documentation/webdocs/markdowndocs/Connector.md b/documentation/webdocs/markdowndocs/Connector.md index 2ecb14c71077abff4f412fc4bc06a56d4459c306..014e88de42df7309d8d6b3aa9b9d0448374edd52 100644 --- a/documentation/webdocs/markdowndocs/Connector.md +++ b/documentation/webdocs/markdowndocs/Connector.md @@ -345,7 +345,7 @@ c1.execute('select * from tb') data = c1.fetchall() # data is a list of returned rows with each row being a tuple numOfRows = c1.rowcount -numOfCols = c1.descriptions +numOfCols = len(c1.description) for irow in range(numOfRows): print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]) diff --git a/documentation/webdocs/markdowndocs/connector-ch.md b/documentation/webdocs/markdowndocs/connector-ch.md index f4151676e63c7af4a609d72cce545e70ac951e1f..a2a9161ce783c0ddf34cd343bce28c9c0c6284d9 100644 --- a/documentation/webdocs/markdowndocs/connector-ch.md +++ b/documentation/webdocs/markdowndocs/connector-ch.md @@ -341,7 +341,7 @@ c1.execute('select * from tb') data = c1.fetchall() # 返回的结果是一个列表,每一行构成列表的一个元素 numOfRows = c1.rowcount -numOfCols = c1.descriptions +numOfCols = len(c1.description) for irow in range(numOfRows): print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])