Example #1
0
	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
Example #2
0
    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
Example #3
0
	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
Example #4
0
    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