def insert_into_cities(value): ''' Insert one row in Cities table :param value: value to be inserted in Cities table ''' db_file = DB_FILE sql = "INSERT INTO Cities(city, country_id) VALUES(?, ?)" return insert_into_table(db_file, sql, value)
def insert_into_countries(value): ''' Insert one row in Countries table :param value: value to be inserted in Countries table ''' db_file = DB_FILE sql = "INSERT INTO Countries(country) VALUES(?)" return insert_into_table(db_file, sql, (value,))
def insert_into_foot(value): ''' Insert one row in Foot table :param value: value to be inserted in Foot table ''' db_file = DB_FILE sql = "INSERT INTO Foot(foot) VALUES(?)" return insert_into_table(db_file, sql, (value, ))
def insert_into_positions(value): ''' Insert one row in Positions table :param value: value to be inserted in Positions table ''' db_file = DB_FILE sql = "INSERT INTO Positions(position) VALUES(?)" return insert_into_table(db_file, sql, (value, ))
def insert_into_clubs(value): ''' Insert one row in Clubs table :param value: value to be inserted in Clubs table ''' db_file = DB_FILE sql = """INSERT INTO Clubs(name, full_name, dob, city_id, country_id, stadium_id) VALUES(?, ?, ?, ?, ?, ?)""" return insert_into_table(db_file, sql, value)
def insert_into_stadiums(value): ''' Insert one row in Stadiums table :param value: value to be inserted in Stadiums table ''' db_file = DB_FILE sql = """INSERT INTO Stadiums(name, city_id, country_id, capacity) VALUES(?, ?, ?, ?)""" return insert_into_table(db_file, sql, value)
def insert_into_players(value): ''' Insert one row in Players table :param value: value to be inserted in Players table ''' db_file = DB_FILE sql = """INSERT INTO Players(first_name, last_name, name_ob, city_id, citizenship, date_ob, foot_id, height, position_id, link) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""" return insert_into_table(db_file, sql, value)