title: PyMySQL, MySQL, Python: String formatting
body: <p>I can't find a solution to this on SO, so my last choice is to ask this. I ran the code on MySQL and everything seems fine, but when I ran the code in Python, I got an error: <code>%d format: a number is required, not str</code>, is this a glitch of PyMySQL? The two <code>%s</code> should be the placeholder of <code>apple</code> while the <code>%d</code>, <code>%b</code>, and <code>%y</code> should be only used within the SQL command and does not act as the placeholder outside the command.</p>
  
  <pre><code>db.query("""SELECT *, DATE_FORMAT(DATE_ADD
              ('1970-01-01 00:00:00',INTERVAL pubtime SECOND),
              '%d %b %Y') AS pubdate FROM media
              WHERE MATCH (description) AGAINST (%s
              IN BOOLEAN MODE) OR MATCH (headline) AGAINST (%s
              IN BOOLEAN MODE) ORDER BY pubtime DESC LIMIT 5""",
              ('apple', 'apple'))
  </code></pre>