- 论坛徽章:
- 0
|
问题还是自己解决吧!
原来, res.fetch_row() 的默认参数是只选取 结果中的一行记录显示
原文:fetch_row() takes some additional parameters. The first one is, how many rows (maxrows) should be returned. By default, it returns one row. It may return fewer rows than you asked for, but never more. If you set maxrows=0, it returns all rows of the result set. If you ever get an empty tuple back, you ran out of rows.
想要解决呢就看下边的:
fetch_row(...)
| fetch_row([maxrows, how]) -- Fetches up to maxrows as a tuple.
| The rows are formatted according to how:
|
| 0 -- tuples (default) ---默认一行
| 1 -- dictionaries, key=column or table.column if duplicated ----参数1,代表所有结果
| 2 -- dictionaries, key=table.column ---暂时不知道 |
|