sqlite3 docbug (was problem with sqlite3)
lgabiot
lgabiot at hotmail.com
Thu Jan 23 02:37:22 EST 2014
Thanks to all,
that was indeed the tuple issue!
the correct code is:
>>>cursor = conn.execute("SELECT filename, filepath FROM files WHERE
max_level<?", (threshold,))
as was pointed out by many.
Sorry for missing such a silly point (well, a comma in fact). I'll learn
to read more seriously the doc, but I was really confused (I spent more
than one hour trying so many combinations, reading the doc, books I
have, etc... before posting, and I was stuck)
but the basis for my blindness was more a lack of grasp of the
fundamentals: how to declare a one element tuple.
Because I tried to write (threshold) being convinced it was a tuple...
I need to remember at all times: https://wiki.python.org/moin/TupleSyntax
best regards.
More information about the Python-list
mailing list