title: using multiple python variables in mysql query
body: <p>I am trying to use multiple variables in a mysql query in python. The first query works fine but I keep getting an error on the second query:<code>1064: you have an error in your sql syntax: check the manual that corresponds to your MySQL server version for the right sytanx to use near ')) from database.table' at line 1</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>query = ("select count(*) from %s.%s;" % (databaseName, tableName))
  
  cursor.execute(query)
  
  for row in cursor.fetchall():
  
         print ("This is the total count: %d" % row)
  
  query = ("select min(%s) from %s.%s;" % (columnName, databaseName, tableName))
  
  result2 = cursor.execute(query)
  
  for row in cursor.fetchall():
  
          print ("This is the min: %d" % row)
  </code></pre>
  
  <p>I am wondering why the first query works fine but the second one is throwing out a syntax error?</p>