On 23/01/2014 07:37, lgabiot wrote:
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.


No, you need to remember how to type xyz into your favourite search engine. For this case xyz would be something like "python single element tuple".

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to