first implementation of search, with only one word

This commit is contained in:
Péter Henrik Gombos 2011-10-08 15:20:50 +00:00
parent 14d98f3d57
commit 1076b8ecaa

View File

@ -226,7 +226,11 @@ def list_cmd(connection, what):
fun(connection)
def search_book(connection, search_strings, search_description=False):
pass
c = connection.cursor()
c.execute('SELECT * FROM book WHERE book.title LIKE %(search_strings)s', {"search_strings": '%' + search_strings[0] + '%'})
for i in xrange(c.rowcount):
cat = fetchone_dict(c)
print cat['title']
def search_person(connection, search_strings):
pass