Пример #1
0
def searchSalesRank(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Rank, Name, Platform FROM tblSales"
        headers = list(('Rank', 'Name', 'Platform'))

    else:
        query = "SELECT Name FROM tblSales WHERE Rank = ?"
        params.append(input)
        headers = list(('Name'))

    ExecuteQuery(query, params, headers)
Пример #2
0
def searchSalesTitle(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Name, Platform, GlobalSales FROM tblSales"
        headers = list(('Name', 'Platform'))

    else:
        query = "SELECT GlobalSales, Platform FROM tblSales WHERE Name = ?"
        params.append(input)
        headers = list(('GlobalSales', 'Platform'))

    ExecuteQuery(query, params, headers)
Пример #3
0
def searchSalesYear(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Name, Platform, Year FROM tblSales"
        headers = list(('Name', 'Platform', 'Year'))

    else:
        query = "SELECT Name, Platform, Year FROM tblSales WHERE Year = ?"
        params.append(input)
        headers = list(('Name', 'Platform', 'Year'))

    ExecuteQuery(query, params, headers)
Пример #4
0
def searchRatingsTitle(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Name, Platform FROM tblSales UNION SELECT Name, Console FROM tblRatings"
        headers = list(('Name', 'Platform'))

    else:
        query = "SELECT Name FROM tblSales WHERE Name = ?"
        params.append(input)
        headers = list(('Name'))

    ExecuteQuery(query, params, headers)
Пример #5
0
def searchRatingsUser(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Userscore, Name FROM tblRatings"
        headers = list(('UserScore', 'Name'))

    else:
        query = "SELECT Name, Userscore FROM tblRatings WHERE Userscore = ?"
        params.append(input)
        headers = list(('Name', 'UserScore'))

    ExecuteQuery(query, params, headers)
Пример #6
0
def searchRatingsCritic(input):
    query = ""
    params = list()
    headers = list()

    if (input.strip() == ""):
        query = "SELECT Metascore, Name FROM tblRatings"
        headers = list(('CriticScore', 'Name'))

    else:
        query = "SELECT Name, Metascore FROM tblRatings WHERE Metascore = ?"
        params.append(input)
        headers = list(('Name', 'CriticScore'))

    ExecuteQuery(query, params, headers)
Пример #7
0
def baseSales():
    query = "SELECT * FROM tblSales"
    params = list()
    headers = list(('Rank', 'Name', 'Platform', 'Year', 'GlobalSales'))
    ExecuteQuery(query, params, headers)
Пример #8
0
def baseRatings():
    query = "SELECT * FROM tblRatings"
    params = list()
    headers = list(
        ('CriticScore', 'Name', 'Console', 'UserScore', 'ReleaseDate'))
    ExecuteQuery(query, params, headers)