kurse erstellen done

This commit is contained in:
Karol Bielski 2025-07-03 12:54:08 +02:00
parent 6c431faa21
commit ae554ab0a6
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class AdminController
if (strpos($value, "*") !== false && (!isset($_POST[$index]) || empty($_POST[$index]))) {
$this->errors[$index] = "Bitte " . $value . " eingeben";
} else {
$this->validData[$index] = $_POST[$index];
$this->validData[$index] = $_POST[$index] === '' ? null : $_POST[$index];
}
}
if (count($this->errors) > 0) {

2
db.sql
View File

@ -25,7 +25,7 @@ CREATE TABLE ort(
CREATE TABLE kurs(
id VARCHAR(36) NOT NULL UNIQUE,
`name` VARCHAR(100) NOT NULL,
kategorie VARCHAR(100) NOT NULL,
kategorie VARCHAR(100),
preis DECIMAL(10, 2) NOT NULL,
kurseleiter VARCHAR(36) NOT NULL,
ort_id VARCHAR(36) NOT NULL,