Skip to content

Instantly share code, notes, and snippets.

@bryanhelmig
Created January 6, 2012 17:42
Show Gist options
  • Save bryanhelmig/1571616 to your computer and use it in GitHub Desktop.
Save bryanhelmig/1571616 to your computer and use it in GitHub Desktop.
fields = ['user_name']
cur.execute("SELECT {0} FROM users LIMIT 10".format( ','.join(fields) ))
for r in cur:
pairs = zip(fields, r)
self.write(r[0] + '<br />')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment