Before you do anything and try to save data, you must make sure that the player is actually connected, you dont want to save an empty value if the player leaves and you try to save.
Add an is_user_connected(id) check inside your SQLITE_Save function.