I have a table in an SQLite3 Database that looks like this:
CREATE TABLE "user" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
"discriminator" TEXT NOT NULL,
"userid" INTEGER NOT NULL UNIQUE,
"username" TEXT NOT NULL,
"matches_played" INTEGER NOT NULL,
"match_wins" INTEGER NOT NULL,
"match_losses" INTEGER NOT NULL,
"match_draws" INTEGER NOT NULL,
"rating" REAL NOT NULL,
"plays_game" INTEGER,
FOREIGN KEY("plays_game") REFERENCES "ygo_games"("game_id")
);
And after attempting an insert like this:
arg = tuple(user_data)
statement = db_cursor.execute('INSERT INTO user VALUES(NULL, ?, ?, ?, ?, ?, ?, ?, ?, NULL)', arg)
result = db_cursor.fetchone()
With the arg tuple being like this:
arg = ('1234', 123123123123, 'Name', 0, 0, 0, 0, 1000)
The result ends up being 'None'. Why could this happen?
Edit: Just realized that INSERT statements don't return any rows, but still, what would be the best way to check if the execution was successful from Python?