Commit 1bb34488 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Use Python 3 syntax in the example

parent cc5ea0ae
Pipeline #20150 passed with stages
in 28 minutes and 10 seconds
......@@ -46,11 +46,11 @@ used the same way you would use any other SQL database from Python, for example:
cursor.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, username VARCHAR)")
cursor.execute("UPSERT INTO users VALUES (?, ?)", (1, 'admin'))
cursor.execute("SELECT * FROM users")
print cursor.fetchall()
cursor = conn.cursor(cursor_factory=phoenixdb.cursor.DictCursor)
cursor.execute("SELECT * FROM users WHERE id=1")
print cursor.fetchone()['USERNAME']
Setting up a development environment
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment