title: What is the equivalent of psycopg curs.mogrify on mysql?
body: <p>What would be the equivalent of psycopg's <code>cur.mogrify</code> on mysql?</p>
  
  <p>From: <a href="http://initd.org/psycopg/docs/cursor.html" rel="noreferrer">http://initd.org/psycopg/docs/cursor.html</a></p>
  
  <blockquote>
    <p>mogrify(operation[, parameters])
    Return a query string after arguments binding. The string returned is exactly the one that would be sent to the database running the execute() method or similar.</p>
    
    <p>>cur.mogrify("INSERT INTO test (num, data) VALUES (%s, %s)", (42, 'bar'))<br>
    >"INSERT INTO test (num, data) VALUES (42, E'bar')"</p>
    
    <blockquote>
      <p>DB API extension The mogrify() method is a Psycopg extension to the DB API 2.0.</p>
    </blockquote>
  </blockquote>
  
  <p>Thanks in advance.</p>