This code is stucks:
c.execute("select * from table_name where num=?", a)
And this is not:
c.execute("select * from table_name where num={}".format(a))
So what is wrong? Colmn in table is int
and a
is int
too
This code is stucks:
c.execute("select * from table_name where num=?", a)
And this is not:
c.execute("select * from table_name where num={}".format(a))
So what is wrong? Colmn in table is int
and a
is int
too
I'm not sure if it works the same on sqlite, but in mysql in order to use the select from select
form, you must give each table an alias, like this:
select count(*) from (select * from users as b where id=ID and lvl=LVL) as a
This might be the source of your problem.