I need to dynamically change tables and variables from time to time, so I wrote a python method like this:
selectQ =\"\"\"SELECT * FROM %s WHERE %s = %s
Did you mean to write:
selectQ = """SELECT * FROM %s WHERE %s = %s;""" % (self.table,self.columnSpecName,idKey) #maybe the idkey should be self.idkey? don't know the rest of the code
self.db.execute(selectQ)
and this is just a mistake with string formatting?
Btw why do you write explicit SQL for this kind of work? better use magical sqlalchemy for python sql manipulation..