Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0

Whoops again

This commit is contained in:
Peder Bergebakken Sundt 2018-08-24 13:24:42 +02:00
parent d0613a8734
commit 07c1a90845
2 changed files with 2 additions and 2 deletions

2
dist/pvv.sql vendored
View File

@ -38,7 +38,7 @@ CREATE TABLE "motd" (
INSERT INTO motd (title, content)
VALUES ("MOTD ./dev.sh", "du kan endre motd i admin panelet");
CREATE TABLE doors (
CREATE TABLE "doors" (
"name" TEXT PRIMARY KEY,
"open" BOOLEAN,
"description" TEXT

View File

@ -45,7 +45,7 @@ class Doors{
];
}
public function setDoorState($name, bool $open) {
public function setDoorState($name, $open) {
$query = 'UPDATE doors SET open=:open WHERE name=:name';
$statement = $this->pdo->prepare($query);
$statement->bindParam(':name', $name, PDO::PARAM_STR);