def query(self,sql,**kwds): try: self.sql = sql % kwds LOG.info('execute SQL[%s]' % (self.sql)) self.cur.execute(self.sql) except MySQLdb.Warning,w: LOG.warn('Warning:%s' % str(w)) self.status = self.status_enum.QUERY_WAR
def query(self, sql, **kwds): try: self.sql = sql % kwds LOG.info('execute SQL[%s]' % (self.sql)) self.cur.execute(self.sql) except MySQLdb.Warning, w: LOG.warn('Warning:%s' % str(w)) self.status = self.status_enum.QUERY_WAR
def query(self,sql,**kwds): self.cur.execute("show variables like 'autocommit';") flag = self.cur.fetchone() LOG.info(flag) try: self.sql = sql % kwds LOG.info('execute SQL[%s]' % (self.sql)) self.cur.execute(self.sql) except MySQLdb.Warning,w: LOG.warn('Warning:%s' % str(w)) self.status = self.status_enum.QUERY_WAR
def query(self, sql, **kwds): self.cur.execute("show variables like 'autocommit';") flag = self.cur.fetchone() LOG.info(flag) try: self.sql = sql % kwds LOG.info('execute SQL[%s]' % (self.sql)) self.cur.execute(self.sql) except MySQLdb.Warning, w: LOG.warn('Warning:%s' % str(w)) self.status = self.status_enum.QUERY_WAR