Can't use question mark (sqlite3, python)
<p>This code is stucks:</p>

<p><code>c.execute("select * from table_name where num=?", a)</code></p>

<p>And this is not:</p>

<p><code>c.execute("select * from table_name where num={}".format(a))</code></p>

<p>So what is wrong? Colmn in table is <code>int</code> and <code>a</code> is <code>int</code> too</p>

<p>I'm not 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:</p>

<pre><code>select count(*) from (select * from users as b where id=ID and lvl=LVL) as a
</code></pre>

<p>It might be the source of your problem.</p>

python sqlite3