diff options
author | Simon Rettberg | 2021-05-06 10:26:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-05-11 14:51:13 +0200 |
commit | 8dc2b92d667f1401ab9f1315a36add61658f899c (patch) | |
tree | 452c5fe040055884cf9d9ee834415db84999a9a1 /modules-available/roomplanner/inc/simpleroom.inc.php | |
parent | [session] Add simple session overview table (diff) | |
download | slx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.tar.gz slx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.tar.xz slx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.zip |
Moderize Database handling
* Auto-convert to utf8mb4_unicode_520_ci
* Use foreach instead of while to loop over results
* Drop useless statement caching
* Keep emulated prepares, as we sometimes loop over nested queries
Diffstat (limited to 'modules-available/roomplanner/inc/simpleroom.inc.php')
-rw-r--r-- | modules-available/roomplanner/inc/simpleroom.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/roomplanner/inc/simpleroom.inc.php b/modules-available/roomplanner/inc/simpleroom.inc.php index 78db6c4a..43ae43ca 100644 --- a/modules-available/roomplanner/inc/simpleroom.inc.php +++ b/modules-available/roomplanner/inc/simpleroom.inc.php @@ -21,7 +21,7 @@ class SimpleRoom extends Room 'SELECT machineuuid, clientip, position FROM machine WHERE fixedlocationid = :locationid', ['locationid' => $locationId]); - while ($clientRow = $ret->fetch(PDO::FETCH_ASSOC)) { + foreach ($ret as $clientRow) { $position = json_decode($clientRow['position'], true); if ($position === false || !isset($position['gridRow']) || !isset($position['gridCol'])) |