Whoops again
This commit is contained in:
parent
d0613a8734
commit
07c1a90845
|
@ -38,7 +38,7 @@ CREATE TABLE "motd" (
|
||||||
INSERT INTO motd (title, content)
|
INSERT INTO motd (title, content)
|
||||||
VALUES ("MOTD ./dev.sh", "du kan endre motd i admin panelet");
|
VALUES ("MOTD ./dev.sh", "du kan endre motd i admin panelet");
|
||||||
|
|
||||||
CREATE TABLE doors (
|
CREATE TABLE "doors" (
|
||||||
"name" TEXT PRIMARY KEY,
|
"name" TEXT PRIMARY KEY,
|
||||||
"open" BOOLEAN,
|
"open" BOOLEAN,
|
||||||
"description" TEXT
|
"description" TEXT
|
||||||
|
|
|
@ -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';
|
$query = 'UPDATE doors SET open=:open WHERE name=:name';
|
||||||
$statement = $this->pdo->prepare($query);
|
$statement = $this->pdo->prepare($query);
|
||||||
$statement->bindParam(':name', $name, PDO::PARAM_STR);
|
$statement->bindParam(':name', $name, PDO::PARAM_STR);
|
||||||
|
|
Loading…
Reference in New Issue