[Tutor] SQLite LIKE question
Alan Gauld
alan.gauld at btinternet.com
Fri Apr 11 19:44:49 CEST 2008
"Dinesh B Vadhia" <dineshbvadhia at hotmail.com> wrote
> As Python/pysqlite stores the items in the db.table as unicode
> strings, I've also run the code with q=u"dog" but get the same
> error. Same with putting the q as a tuple ie. (q) in the Select
(q) is not a tuple, it is a variable surrounded by quotes.
They are different.
To pass a single element as a tuple add a comma:
(q,)
like so.
Try that.
Alan G.
More information about the Tutor
mailing list