L
lgabiot
Hello,
I'm building an application using a simple sqlite3 database.
At some point, I need to select rows (more precisely some fields in
rows) that have the following property: their field max_level (an INT),
should not exceed a value stored in a variable called threshold, where
an int is stored (value 20000).
(threshold needs to be set by the user, so I cannot hard code a value
there).
My database already exist on my drive (and of course the sqlite3 module
is imported)
I do the following:
that's OK
max_level<(?)", threshold)
that doesn't work (throw an exception)
if I do:max_level<20000)")
it works...
I did similar operations on UPDATE instead of SELECT, and it works there.
Maybe my mind is fried right now, but I can't figure out the solution...
best regards.
I'm building an application using a simple sqlite3 database.
At some point, I need to select rows (more precisely some fields in
rows) that have the following property: their field max_level (an INT),
should not exceed a value stored in a variable called threshold, where
an int is stored (value 20000).
(threshold needs to be set by the user, so I cannot hard code a value
there).
My database already exist on my drive (and of course the sqlite3 module
is imported)
I do the following:
that's OK
max_level<(?)", threshold)
that doesn't work (throw an exception)
if I do:max_level<20000)")
it works...
I did similar operations on UPDATE instead of SELECT, and it works there.
Maybe my mind is fried right now, but I can't figure out the solution...
best regards.