title: TypeError: unsupported operand type(s) for %: 'long' and 'str'
body: <p>With this code:</p>
  
  <pre><code>current_time=time.localtime()
  time_now=time.strftime('%H:%M:%S',current_time)
  
  cursor.execute("Select * from SUBSCRIPTION_DETAILS where Alert_time='%s'") % time_now
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>unsupported operand type(s) for %:long and str
  </code></pre>
  
  <p><code>type</code> of <code>Alert_time</code> is varchar</p>