On 9/6/06, Nasr Y.M.J.O. <[EMAIL PROTECTED]> wrote: > def get_OSS(self): > #grabs the OSS servers from the database > line 99 --------> query = 'select nodes.id, nodes.name from nodes where > '\ > 'nodes.membership=%d ' \ > 'or nodes.membership=%d' \ > % (self.memberships['Compute-oss'], > self.memberships['Lustre-oss']) > > osslist = [] > rc = self.rocksdb.execute(query)
Don't do that; you should only use %s placeholders with MySQLdb, and you aren't passing your parameters to execute().. Please read the documentation, and particularly PEP-249. This is what you should be doing: On 9/6/06, Nasr Y.M.J.O. <[EMAIL PROTECTED]> wrote: def get_OSS(self): #grabs the OSS servers from the database query = """select nodes.id, nodes.name from nodes where nodes.membership=%s or nodes.membership=%s""" parameters = (self.memberships['Compute-oss'], self.memberships['Lustre-oss']) osslist = [] rc = self.rocksdb.execute(query, parameters) -- This message has been scanned for memes and dangerous content by MindScanner, and is believed to be unclean. _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig