Kommentare in Datenbank.php
Habe Kommentare in Datenbank.php hinzugefügt
This commit is contained in:
parent
1d415a6ab0
commit
574f2362b1
1 changed files with 14 additions and 13 deletions
|
@ -19,22 +19,22 @@
|
|||
class Datenbank extends DBClass
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $passwort
|
||||
* Diese Methode prüft, ob das Loginpasswort und -name mit den Werten in der Datenbank übereinstimmen
|
||||
* @param string $name Loginname
|
||||
* @param string $passwort Loginpasswort
|
||||
* @return boolean
|
||||
*/
|
||||
public function checkLogin(string $name, string $passwort)
|
||||
{
|
||||
$sql = 'SELECT * FROM Test_v2 WHERE Name=:name AND Code=:passwort';
|
||||
|
||||
|
||||
$params = array(
|
||||
'name' => strtolower($name),
|
||||
'passwort' => $passwort
|
||||
);
|
||||
|
||||
|
||||
$result = $this->select($sql, $params);
|
||||
|
||||
|
||||
if (count($result) == 1) {
|
||||
return true;
|
||||
} else {
|
||||
|
@ -43,14 +43,14 @@ class Datenbank extends DBClass
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Diese Methode prüft, ob ein Nutzer sich schon eingetragen hat
|
||||
* @param string $name
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasAlredySelected(string $name)
|
||||
{
|
||||
$sql = 'SELECT * FROM Test_v2 WHERE Name=:name AND Kurs IS NOT NULL AND Kurs2 IS NOT NULL AND Kurs3 IS NOT NULL ';
|
||||
|
||||
|
||||
$params = array(
|
||||
'name' => $name
|
||||
);
|
||||
|
@ -65,8 +65,8 @@ class Datenbank extends DBClass
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array strings
|
||||
* Diese Methode gibt alle verfügbaren Kurse aus
|
||||
* @return Countable|array
|
||||
*/
|
||||
public function selectKurse()
|
||||
{
|
||||
|
@ -76,8 +76,9 @@ class Datenbank extends DBClass
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $kurse
|
||||
* Diese Methode trägt die Auswahl eines Benutzers in die Datenbank ein
|
||||
* @param string Loginname
|
||||
* @param array[strings] Die ausgewählten Kurse
|
||||
* @return boolean
|
||||
*/
|
||||
public function insertSelection(string $name, array $kurse)
|
||||
|
@ -107,4 +108,4 @@ class Datenbank extends DBClass
|
|||
{
|
||||
return true;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue