Remake approved view and add rename input in setting for room name

This commit is contained in:
haitem
2021-03-01 17:38:44 +01:00
parent 5f03295ad3
commit 4ab70a1c2d
4 changed files with 26 additions and 3 deletions

View File

@@ -37,6 +37,15 @@ class RoomManager{
}
}
public static function edit ($roomId, $values = []) {
try {
Db::edit ('rooms', $values, 'WHERE room_id = ?', array($roomId));
} catch(PDOException $error) {
echo $error->getMessage();
die();
}
}
public static function delete ($roomId) {
Db::command ('DELETE FROM rooms WHERE room_id=?', array ($roomId));
}