title: Django raw sql %d for ID not working for integer parameters
body: <p>I have this raw sql for my Django model:</p>
  <pre><code>cursor.execute('SELECT crowdfunding_offering.offering_name FROM crowdfunding_offering WHERE crowdfunding_offering.id = %d ORDER BY crowdfunding_offering.id DESC LIMIT 1', (int(self.offering.id),))
  </code></pre>
  <p>Which does not work. I am receiving this error:</p>
  <pre><code>Exception Value:    near &quot;%&quot;: syntax error
  </code></pre>
  <p>Then I try to change <code>%d</code> to <code>%s</code>, only then it works. I thought <code>%d</code> are for number parameters and <code>%s</code> are for strings, but why is it not working for <code>%d</code>?</p>
  <p>Here is the table with the id clearly being an integer:</p>
  <p><a href="https://i.stack.imgur.com/BYA7F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BYA7F.png" alt="enter image description here" /></a></p>