Compare commits

..

No commits in common. "main" and "getBenutzer" have entirely different histories.

5 changed files with 1 additions and 67 deletions

View File

@ -56,13 +56,6 @@ class BenutzerController
return json_encode($result);
}
public function anmeldeVersuch()
{
$result = $this->db->anmeldeVersuch();
return json_encode($result);
}
}
?>

View File

@ -48,7 +48,7 @@ class KindController
{
$result = $this->db->deleteKind($kindId);
return json_encode($result);
return $result;
}
}

View File

@ -33,11 +33,5 @@ class TagesplanController
$result = $this->db->deleteTagesplan($id);
return json_encode($result);
}
public function getGerichteOnTag()
{
$result = $this->db->getGerichteOnTag();
return json_encode($result);
}
}
?>

View File

@ -117,7 +117,6 @@ class BenutzerModel extends Database
$stmt = $pdo->prepare($sql);
$stmt->execute($params);
} catch (\PDOException $e) {
echo "Faulty Sql? " . $sql;
return false;
}
@ -137,7 +136,6 @@ class BenutzerModel extends Database
$stmt = $pdo->prepare($sql);
$stmt->execute();
} catch (\PDOException $e) {
echo "Faulty Sql? " . $sql;
return false;
}
@ -146,34 +144,6 @@ class BenutzerModel extends Database
return $result;
}
public function anmeldeVersuch()
{
$pdo = $this->linkDB();
$params = array();
$params[":Benutzername"] = $_GET["Benutzername"];
$params[":passwort"] = $_GET["passwort"];
$sql = "SELECT * FROM Benutzerkonto WHERE name = :Benutzername AND passwort = :passwort";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute($params);
} catch (\PDOException $e) {
return false;
}
$result = $stmt->fetchALL(\PDO::FETCH_ASSOC);
if (count($result) > 0)
return true;
else
return false;
}
}
?>

View File

@ -65,28 +65,5 @@ class TagesplanModel extends Database
return false;
}
}
public function getGerichteOnTag()
{
$pdo = $this->linkDB();
$datum = $_GET["datum"];
$sql = "SELECT Gericht.id, Gericht.name, Gericht.preis, Gericht.beschreibung FROM Gericht LEFT JOIN GibtsAm ON Gericht.id = GibtsAm.gid LEFT JOIN Tagesplan ON GibtsAm.tid = Tagesplan.id WHERE Tagesplan.datum = '$datum'";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute();
} catch (\PDOException $e) {
echo $sql . " This do be faulty";
return false;
}
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
return $result;
}
}
?>