擅长:python、mysql、java
<p>我没有将MySQL用于Python,但是如果我不得不猜测的话,它将%2E解释为printf样式的格式参数(请参见<a href="http://structure.usc.edu/mysqldb/MySQLdb-3.html#ss3.1" rel="nofollow" title="paramstyle">this page</a>),并期望得到一个参数。你应该尝试一下:</p>
<pre><code>cur = conn.cursor()
sql = "select count(*) from sbox_trig where date > CURDATE() and name = %s"
cur.execute(sql, ("bw109nocd%2Ezip",))
</code></pre>