— Posted in 程式設計

SQLite 測試連接程式碼

# import sqlite3 as db

# conn = db.connect(‘C:/Users/hc.teng/test.db’)
# cursor = conn.cursor()
# # cursor.execute(‘insert into t1 values(“005″,”cat”,”woman”,”13″)’)
# # conn.commit()

# cursor.execute(‘select * from t1 order by id asc;’)
# print(cursor.fetchall())

# conn.close()