def runQuerySeasonTeamCategory(self, season, team, force): query_file_path = os.getcwd() + '/db/' + inspect.stack()[1][3] + '.sql' file = open(query_file_path, 'r') query_sentence = file.read() return dbtool.executeQueryFirst( self._db, query_sentence, [season, "%" + team + "%", season, "%" + team + "%"])
def getTotalGoalsConcededAway(self, team): query = 'select sum(home_score), count(*) from MATCH, TEAM \ where MATCH.away_id = TEAM.team_id and TEAM.name like ?' return dbtool.executeQueryFirst(self._db, query, ['%' + team + '%'])
def queryPerformance(self, team): query_sentence = self.readQuery() return dbtool.executeQueryFirst(self._db, query_sentence, ["%" + team + "%", "%" + team + "%"])
def queryGoalMinute(self, season, team, m_from, m_to): query_sentence = self.readQuery() return dbtool.executeQueryFirst( self._db, query_sentence, [season, "%" + team + "%", m_from, m_to, season, "%" + team + "%"])
def queryOver25Category(self, season, team, force): query_sentence = self.readQuery() return dbtool.executeQueryFirst( self._db, query_sentence, [force, force, season, "%" + team + "%", season, "%" + team + "%"])