I still have this code:<br><br> sql = 'select * from options%s where ID=%%s', (opTable[0].upper() + opTable[1:])<br> cursor.execute(sql, (id,))<br><br>which throws this error:<br><br> /var/www/html/<a href="http://angrynates.com/cart/enterOptionsPrices2.py">angrynates.com/cart/enterOptionsPrices2.py</a><br>
70 print 'All options prices have been successfully updated.'<br> 71 print '</body>\n</html>'<br> 72 <br> 73 enterOptionsPrices2()<br> 74 <br>enterOptionsPrices2 = <function enterOptionsPrices2><br>
/var/www/html/<a href="http://angrynates.com/cart/enterOptionsPrices2.py">angrynates.com/cart/enterOptionsPrices2.py</a> in enterOptionsPrices2()<br> 58 id = form.getfirst('%sID' % option)<br> 59 sql = 'select * from options%s where ID=%%s', (opTable[0].upper() + opTable[1:])<br>
60 cursor.execute(sql, (id,))<br> 61 # cursor.execute('select * from options%s where ID=%s' % (opTable[0].upper() + opTable[1:], id))<br> 62 if cursor.fetchone() is not None:<br>cursor = <MySQLdb.cursors.Cursor object>, cursor.execute = <bound method Cursor.execute of <MySQLdb.cursors.Cursor object>>, sql = ('select * from options%s where ID=%%s', 'Sizes'), id = '0.00'<br>
/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py in execute(self=<MySQLdb.cursors.Cursor object>, query=('select * from options%s where ID=%%s', 'Sizes'), args=('0.00',))<br> 144 db = self._get_db()<br>
145 charset = db.character_set_name()<br> 146 query = query.encode(charset)<br> 147 if args is not None:<br> 148 query = query % db.literal(args)<br>query = ('select * from options%s where ID=%%s', 'Sizes'), query.encode undefined, charset = 'latin1'<br>
<br>AttributeError: 'tuple' object has no attribute 'encode'<br> args = ("'tuple' object has no attribute 'encode'",) <br><br><br>Please advise.<br>TIA<br>beno<br>