title: Update with prepared statement executing improperly
body: <p>So I'm working in a Python 3.5.2 venv with SQLAlchemy and MySQL. I'm trying to update the status of an order (row) in a table. This requires simply changing the value of one column in a row. The following shows the function I'm working with:</p>
  
  <pre><code>def update_order_status(self, order):
      newstatus = self.orderwindow.status.currentIndex()
      orderid = order.orderid
  
      stmt = update(Order)\
          .where(Order.orderid == orderid).values(status=newstatus)
  
      session.execute(stmt)   
      session.commit()
  </code></pre>
  
  <p><code>newstatus</code> is an integer value taken from the current choice set 
  in a dropdown menu presented to the user. Upon the <code>session.commit()</code>the following errors are </p>
  
  <pre><code>   .....
  
    File "C:\Python35\Python35-32\lib\site-packages\MySQLdb\connections.py", line 292, in query
      _mysql.connection.query(self, query)
  sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1366, "Incorrect integer value: 'Patient' for column 'bill' at row 1") [SQL: 'UPDATE `order` SET bill=%s, ship=%s, status=%s, flavor=%s WHERE `order`.orderid = %s'] [parameters: ('Patient', 'Pickup', 'Received', 7, 100000)]
  
  ......
  Process finished with exit code 1
  </code></pre>
  
  <p>The parameters executed are not at all what is shown in the prepared statement. It should only be updating the row with the orderid matching the one provided as a parameter to the function and the status from the dropdown.</p>
  
  <p>I've updated all packages and tried other methods of updating including <code>setattr(order, "status", newstatus)</code></p>
  
  <p>I'm unsure of what to do to diagnose this error.</p>
  
  <p>EDIT: I forgot to mention earlier that this function actually works flawlessly in a python console after copy-pasting my database declarations script first.</p>