title: Python 3.5.2 "takes from 2 to 3 positional arguments but 4 were given"
body: <p>I'm making a program in python that connects to a mysql database and can access it and manipulate it. I am using PyMySQL in order to do this however I am stumped by this error that keeps occuring in my program. Here is the error:</p>
  
  <pre><code>cursor.execute("SELECT * FROM Bookings WHERE ? = ?", record, recordtype)
  TypeError: execute() takes from 2 to 3 positional arguments but 4 were given
  </code></pre>
  
  <p>But I see no error in my code (may be being a bit confident).</p>
  
  <pre><code>def findbooking():
     recordtype =  input("Which field do you want to search?: ")
     record = input("Enter what you want to search: ")
     findbookingsql(record, recordtype)
  
  def findbookingsql(record, recordtype):  #Connect to Database and find record specified
      conn = sql.connect(server,user, password,database)
      cursor = conn.cursor()
      cursor.execute("SELECT * FROM Bookings WHERE ? = ?",recordtype,record)
      row = cursor.fetchone()
      conn.close()
      return row
  </code></pre>