source:
people/peter.buschman/backup_monitoring/dal/builtins/one_column.py@
1273
Last change on this file since 1273 was 976, checked in by , on Dec 6, 2011 at 10:19:33 AM | |
---|---|
File size: 202 bytes |
Line | |
---|---|
1 | ## |
2 | ## one_column - return the first column of all results from an SQL query as an array |
3 | # |
4 | def one_column(curs, query): |
5 | |
6 | curs.execute(query) |
7 | |
8 | return [row[0] for row in curs.fetchall()] |
9 |
Note:
See TracBrowser
for help on using the repository browser.