Skip to content

Instantly share code, notes, and snippets.

@bryanhelmig
Created January 6, 2012 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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