#database code for learning purposes
import sqlite3
connectdb=sqlite3.connect('mydata.db') #Create data base named mydata.db on disk
c=conn.cursor() #Create a cursor object so SQL commands can be executed
#Create a table named deedrecord
c.execute("create table deedrecord (deed text,grantor text,grantee text,deeddate text)")
#Add some records to the table
c.execute("insert into deedrecord values ('1234123','mickey mouse','donald duck','111010')")
c.execute("insert into deedrecord values ('3456345','steve atchison','ronald regan','110910')")
therows=c.execute("select * from deedrecord")
for rows in therows:
print(rows[0])
print(rows[1])
print(rows[2])
print(rows[3])
No comments:
Post a Comment