buku/markit
Arun Prakash Jana f0327ae980 Initial commit.
Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
2015-11-02 01:34:41 +05:30

22 lines
506 B
Python
Executable File

#!/usr/bin/python3
import sqlite3
# Main starts here
# ----------------
conn = sqlite3.connect('example.db')
c = conn.cursor()
#c.execute('''DROP TABLE if exists stocks''')
c.execute('''CREATE TABLE if not exists stocks
(URL text NOT NULL, tags text, metadata text)''')
c.execute("INSERT INTO stocks VALUES ('www.google.com','search engine','')")
conn.commit()
t = ('search',)
for row in c.execute("SELECT * FROM stocks WHERE tags LIKE ('%' || ? || '%')", t):
print(row)
conn.close()