Initial commit.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
This commit is contained in:
Arun Prakash Jana 2015-11-02 01:34:41 +05:30
parent 246d4fac72
commit f0327ae980

21
markit Executable file
View File

@ -0,0 +1,21 @@
#!/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()