Exemplo n.º 1
0
def returntotalplayers():
    conn, c = connection()

    c.execute('select * from PlayersPrices')

    x = c.fetchall()
    return x
Exemplo n.º 2
0
from databasecon import connection

conn, c = connection()


def return1ifloggedin(buyerid, password):

    c.execute(
        "select count(*) from Buyers_ where Buyerid=:buyerid and password=:password",
        {
            "buyerid": buyerid,
            "password": password
        })
    x = c.fetchall()

    if x[0][0] == 1:

        return 1
    return 0


def insertintoPlayersBuyersRequests(lis):

    for i in lis:
        buyerid = i[0]
        buyersprice = i[3]
        playername = i[1]
        c.execute(
            "select count(*) from PlayersBuyersrequests_ where Buyerid=:buyerid and PlayerName=:playername",
            {
                "buyerid": buyerid,