Friday, May 30, 2014

Extract Data from an sqlite3 database.

#Use this program to get the data from parceldata.db

import sqlite3
conn=sqlite3.connect("parceldata.db")
cur=conn.cursor()

myrows=cur.execute("select * from parcel_table")
   
for row in myrows:
        
    print('------------------------------------------\n')
    print row[0]
    print row[1]
    print("PIN: ")+ row[2]
    print("Quick ref: ")+ str(row[3])
    print("Calc acres: ")+ str(row[4])
        

print("\n\n  ")
raw_input("press return to close this window")

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.