This commit is contained in:
Naomi 2013-08-02 11:19:46 -04:00
parent 6e43094d10
commit b480a5ae18
1 changed files with 14 additions and 14 deletions

View File

@ -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);