Compare commits
No commits in common. "1826e9f61bb3738f036af881c435d14830e992c2" and "b6ec972c19e3e3126414554b9172c0bb21a4de92" have entirely different histories.
1826e9f61b
...
b6ec972c19
@ -36,14 +36,6 @@ class BenutzerController
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
|
||||
public function nextId()
|
||||
{
|
||||
$result = $this->db->nextId();
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -94,25 +94,7 @@ class BenutzerModel extends Database
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function nextId()
|
||||
{
|
||||
|
||||
$pdo = $this->linkDB();
|
||||
|
||||
$sql = "SELECT `auto_increment` FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'Benutzerkonto'; ";
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
} catch (\PDOException $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $stmt->fetchALL(\PDO::FETCH_ASSOC);
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -15,15 +15,11 @@
|
||||
file_get_contents('php://input') die übergebenen json-Strings (für PUT/POST-Requests)
|
||||
*/
|
||||
spl_autoload_register(function ($className) {
|
||||
if (substr($className, 0, 4) !== 'ppb\\') {
|
||||
return;
|
||||
}
|
||||
if (substr($className, 0, 4) !== 'ppb\\') { return; }
|
||||
|
||||
$fileName = __DIR__.'/'.str_replace('\\', DIRECTORY_SEPARATOR, substr($className, 4)).'.php';
|
||||
|
||||
if (file_exists($fileName)) {
|
||||
include $fileName;
|
||||
}
|
||||
if (file_exists($fileName)) { include $fileName; }
|
||||
});
|
||||
|
||||
$endpoint = explode('/', trim($_SERVER['PATH_INFO'],'/'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user