fix: Verwalte Spieleinsatz über Quoten-Tabelle
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
362966e0cd
commit
d130676940
4 changed files with 25 additions and 21 deletions
|
|
@ -75,12 +75,11 @@ class Season {
|
|||
|
||||
try {
|
||||
$stmt = $db->prepare(
|
||||
"INSERT INTO seasons (name, rounds, stake, created_at, updated_at) VALUES (:name, :rounds, :stake, NOW(), NOW())"
|
||||
"INSERT INTO seasons (name, rounds, created_at, updated_at) VALUES (:name, :rounds, NOW(), NOW())"
|
||||
);
|
||||
$stmt->execute([
|
||||
':name' => $data['name'],
|
||||
':rounds' => $data['rounds'],
|
||||
':stake' => $data['stake'],
|
||||
]);
|
||||
$seasonId = $db->lastInsertId();
|
||||
|
||||
|
|
@ -111,13 +110,12 @@ class Season {
|
|||
public static function update($id, $data) {
|
||||
$db = Database::getConnection();
|
||||
$stmt = $db->prepare(
|
||||
"UPDATE seasons SET name = :name, rounds = :rounds, stake = :stake, updated_at = NOW() WHERE id = :id"
|
||||
"UPDATE seasons SET name = :name, rounds = :rounds, updated_at = NOW() WHERE id = :id"
|
||||
);
|
||||
return $stmt->execute([
|
||||
':id' => $id,
|
||||
':name' => $data['name'],
|
||||
':rounds' => $data['rounds'],
|
||||
':stake' => $data['stake'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue