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

@@ -25,7 +25,7 @@ if (isset($searchPhrase) && !empty($searchPhrase)) {
$sql .= " AND (`S`.`title` LIKE '%$searchPhrase%' OR `S`.`start` LIKE '%$searchPhrase%' OR `S`.`end` LIKE '%$searchPhrase%')";
}
$count_sql = "SELECT COUNT(`id`) $sql";
$count_sql = "SELECT COUNT(`schedule_id`) $sql";
$total = dbFetchCell($count_sql, $param);
if (empty($total)) {
$total = 0;

View File

@@ -38,7 +38,7 @@ if ($rowCount != -1) {
$sql .= " LIMIT $limit_low,$limit_high";
}
$sql = "SELECT * $sql";
$sql = "SELECT `port_descr_descr` $sql";
foreach (dbFetchRows($sql, $param) as $customer) {
$i++;

View File

@@ -26,9 +26,12 @@ if (!isset($sort) || empty($sort)) {
$sort = 'last_polled_timetaken DESC';
}
$sql .= " AND D.status ='1' AND D.ignore='0' AND D.disabled='0' ORDER BY $sort";
$sql .= " AND D.status ='1' AND D.ignore='0' AND D.disabled='0'";
$count_sql = "SELECT COUNT(`D`.`device_id`) $sql";
$sql .= " ORDER BY $sort";
$total = dbFetchCell($count_sql);
if (empty($total)) {
$total = 0;