擅长:python、mysql、java
<p><code>execute</code>没有返回值,检查它,没有任何意义,只检查<code>fetchall</code>的空结果:</p>
<pre><code>def checkAnswers(gameId):
print("inside check answers function")
print(gameId)
id = str(gameId)
c, conn = connection()
c.execute("SELECT answer_one, answer_two FROM games WHERE game_id=%s", (thwart(id),))
return c.fetchall()
</code></pre>