title: Python MySQLdb execute table variable
body: <p>I'm trying to use a variable for a table name. I get the error "... near ''myTable'' at line 1
  I must not be escaping this right. The double '' in the error seems to be a clue, but I don't get it.</p>
  
  <pre><code>db = MySQLdb.connect("localhost","user","pw","database" )
  table = "myTable"
  def geno_order(db, table):
      cursor = db.cursor() # prepare a cursor object using cursor() method
      sql = "SELECT * FROM %s"
      cursor.execute(sql, table)
      results = cursor.fetchall()
  </code></pre>