Skip to content

Instantly share code, notes, and snippets.

@gamesbrainiac
Created June 20, 2013 14:55
Show Gist options
  • Save gamesbrainiac/5823448 to your computer and use it in GitHub Desktop.
Save gamesbrainiac/5823448 to your computer and use it in GitHub Desktop.
Learning SQL! :D
def query():
cursor = db.execute("SELECT * FROM links WHERE submitter_id=62443 ORDER BY submitted_time ASC")
assert isinstance(cursor, sqlite3.Cursor)
return_links = [Link(*link).id for link in cursor.fetchall()]
return return_links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment