feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)

* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY

* fix all schema errors and update system
This commit is contained in:
Neil Lathwood
2017-01-07 17:32:38 +00:00
committed by Tony Murray
parent 8936d9503b
commit da5783d917
33 changed files with 67 additions and 247 deletions

View File

@ -788,9 +788,9 @@ function getlocations()
// Fetch regular locations
if ($_SESSION['userlevel'] >= '5') {
$rows = dbFetchRows('SELECT D.device_id,location FROM devices AS D GROUP BY location ORDER BY location');
$rows = dbFetchRows('SELECT location FROM devices AS D GROUP BY location ORDER BY location');
} else {
$rows = dbFetchRows('SELECT D.device_id,location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = ? GROUP BY location ORDER BY location', array($_SESSION['user_id']));
$rows = dbFetchRows('SELECT location FROM devices AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = ? GROUP BY location ORDER BY location', array($_SESSION['user_id']));
}
foreach ($rows as $row) {