Skip to content

Commit

Permalink
Fix regression where edit would leave the original when moving tables
Browse files Browse the repository at this point in the history
  • Loading branch information
xdpirate committed Dec 1, 2023
1 parent 86bfea5 commit f18c089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
mysqli_query($link, "INSERT INTO $newTable (GameName,Platforms) VALUES ('$gameName','$platforms')");
}

$gameID = mysqli_insert_id($link);
$newGameID = mysqli_insert_id($link);
mysqli_query($link, "DELETE FROM $oldTable WHERE ID=$gameID");
}

$fragment = strtolower(substr($newTable, 5, 1)) . strval($gameID);
$fragment = strtolower(substr($newTable, 5, 1)) . strval($newGameID);

header("Location: ./?t=$targetTable#$fragment");
}
Expand Down

0 comments on commit f18c089

Please sign in to comment.