title: How to use multiple where varibles in my sql select statement in python?
body: <p>Question I have a simple application to query some of my oracle tables I want to be able to grab the value of my text boxes which work but, I keep getting this error any help would be greatly appreciated!</p>
  
  <p>test.py</p>
  
  <pre><code>def grabEnts():
     global date 
     connection = cx_Oracle.connect('xxxxxxxx/xxxxxxxx@x.x.x.x:xxxx/xxx')
     cursor = connection.cursor()
     startdate = e1.get()
     enddate = e2.get()
     #fs = datetime.date(startdate)
     #fe = datetime.date(endate)
     //this works but, I would like to use both startdate and endate
     #cursor.execute("SELECT EMP_ID FROM TO_ENTRIES WHERE LEAVE_START &gt;= '%s'" % startdate)
      //Like this but I can't get it to work I keep getting this error 
      File "test.py", line 62, in grabEnts
     cursor.execute('SELECT EMP_FIRST_NAME FROM TO_ENTRIES WHERE LEAVE_START &gt;=%s AND LEAVE_END &lt;=%s', startdate, enddate)
     TypeError: function takes at most 2 arguments (3 given)
  
     cursor.execute('SELECT EMP_FIRST_NAME FROM TO_ENTRIES WHERE LEAVE_START &gt;=%s AND LEAVE_END &lt;=%s', startdate, enddate)
     for row in cursor:
         outputent.writerow(row)
     cursor.close()
     connection.close()
  </code></pre>