its not fun
the error is not even explainable for me
im doing an SQL query with python (sqlite3)
now when i ask it to get me the team id of the team with the matching name
it messes up
the query basically looks like this
SELECT Id FROM Teams WHERE Name = BBL Esport
or
SELECT Id FROM Teams WHERE Name = Eternal Fire
BBL is team id 1 in the Teams table
Eternal Fire is team id 2
yet
for BBL it returns 2
for Eternal Fire it returns NONE
im confused as hell
edit: i figured it out
the way an Sqlite query works in python appears to be 1 request at a time no matter the variable name
so for example my error was:
Team1_id = [sql query]
Team2_id = [sql query]
Team1_id = Team1_id.fetchone() <- would return the result of the second query
Team2_id = Team2_id.fetchone() <- would return nothing since the result was already fetched
solution was simply to move the lines like this
Team1_id = [sql query]
Team1_id = Team1_id.fetchone()
Team2_id = [sql query]
Team2_id = Team2_id.fetchone()
no idea why since they have diffrent variable names, but hey, i figured it out

