March 01, 2004
The SQLite Database Engine
March 04:
Listing 9: SQLite from Python.
import sqlite
conn = sqlite.connect(db="db", mode=077)
cursor = conn.cursor()
SQL = """select projectname_full as name,
rating from project
order by rating desc"""
cursor.execute(SQL)
row = cursor.fetchone()
while row != None:
print "%14s, %15s" % (row['name'], row['rating'])
row = cursor.fetchone()
conn.close()
Previous Page |
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10