What you need to do the Sqlite UPDATE work?

Hello.
Decided to write a small app in order to get information about the characters from the game server.
For data storage I decided to use SQLite.
I was able to do that would be:
The program got the data and put in database -> Show
But:
When it comes time to update the information code is not working,although the error is not popping up
Tell me what am I doing wrong?
The search function for the player's information in the database
def search_nicknames(name):
 cursor = conn.cursor()
 sql = "SELECT * FROM user_info WHERE Nickname ==? "
 search_data_update = []
 print("search_nicknames ",name)



 cursor.execute(sql, (name,)) 
#print(name[i])

 result = cursor.fetchall()
cursor.close()
 #print("Fetachall: ", result)
 if result == []:
print("ISNERT")
 return insert_data(name)



 if result != []:

 print("Got into DB", name,result[0][9])

 if (time.time() - result[0][9]) > 1800 or result[0][1] == "ERROR":

 print("Last updated "time.ctime(result[0][9]) ," ", result[0][1],result[0][2])
print(time.ctime(time.time()))

 return update_data(name)

else:
 print("too early" , name)

 return result[0]

The data refresh feature
def update_data(name):
 cursor = conn.cursor()



 print("update_data" , name)
 req_data_user = user_req(name)


 print("UPDATE DATA",req_data_user[1],req_data_user[2],req_data_user[3],req_data_user[4],req_data_user[5],req_data_user[6],req_data_user[7],req_data_user[8],time.time(),name[0])


 cursor.execute("""UPDATE user_info set Corporation = ? Alliance = ?,Sec_status = ? ,Ship_Kill = ? ,Solo_Kill = ?,Ship_Lost = ?,Gang_Ratio = ? ,ZKillboard_inf = ?, time_update = ? WHERE Nickname = = ?""",(req_data_user[1],req_data_user[2],req_data_user[3],req_data_user[4],req_data_user[5],req_data_user[6],req_data_user[7],req_data_user[8],time.time(),name[0]))


conn.commit()
cursor.close()

 return req_data_user
April 4th 20 at 00:30
2 answers
April 4th 20 at 00:32
Solution
Performed UPDATE user_info in settings, use name[0], but should be just name.
April 4th 20 at 00:34
In the query WHERE Nickname == ? correct on WHERE Nickname = ?
It does not change the situation.
There is an assumption that 2 consecutive request.as each other way,because if a separate call to the update function without return statement everything works - larissa65 commented on April 4th 20 at 00:37

Find more questions by tags PythonSQLSQLite