diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 9311be640..3962461fc 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -189,19 +189,19 @@ class Application_Service_HistoryService } //need to count the total rows to tell Datatables. - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); + $stmt = $this->con->prepare($mainSqlQuery); + foreach ($paramMap as $param => $v) { + $stmt->bindValue($param, $v); } - - if ($stmt->execute()) { + + if ($stmt->execute()) { $totalRows = $stmt->rowCount(); - Logging::info("Total Rows {$totalRows}"); - } - else { - $msg = implode(',', $stmt->errorInfo()); - Logging::info($msg); - throw new Exception("Error: $msg"); + Logging::info("Total Rows {$totalRows}"); + } + else { + $msg = implode(',', $stmt->errorInfo()); + Logging::info($msg); + throw new Exception("Error: $msg"); } //------------------------------------------------------------------------ @@ -242,13 +242,13 @@ class Application_Service_HistoryService } $displayLength = intval($opts["iDisplayLength"]); - //limit the results returned. - if ($displayLength !== -1) { + //limit the results returned. + if ($displayLength !== -1) { $mainSqlQuery.= " OFFSET :offset LIMIT :limit"; $paramMap["offset"] = $opts["iDisplayStart"]; - $paramMap["limit"] = $displayLength; + $paramMap["limit"] = $displayLength; } $stmt = $this->con->prepare($mainSqlQuery);