Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #38 from noten-app/user-unique-ids
Browse files Browse the repository at this point in the history
πŸ› Fix class creation without an id
  • Loading branch information
CuzImBisonratte authored Nov 22, 2023
2 parents 884d2d7 + 4453aeb commit 2b9cf84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subjects/add/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$subjectID = bin2hex(random_bytes(4));

// Add subject to DB and get inserted ID
if ($stmt = $con->prepare('INSERT INTO ' . $config["db"]["tables"]["subjects"] . ' (id, name, color, user_id, grade_k, grade_m, grade_t, grade_s, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?)')) {
if ($stmt = $con->prepare('INSERT INTO ' . $config["db"]["tables"]["subjects"] . ' (id, name, color, user_id, grade_k, grade_m, grade_t, grade_s, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)')) {
$stmt->bind_param('ssssiisis', $subjectID, $subjectName, $subjectColor, $_SESSION["user_id"], $gradingTypeK, $gradingTypeM, $gradingTypeT, $gradingTypeS, $_SESSION["setting_years"]);
$stmt->execute();
$stmt->close();
Expand Down

0 comments on commit 2b9cf84

Please sign in to comment.