@@ 420-427 (lines=8) @@ | ||
417 | } |
|
418 | } |
|
419 | $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table; |
|
420 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
421 | $sql .= ' ' . $criteria->renderWhere(); |
|
422 | if ($criteria->groupby != '') { |
|
423 | $sql .= $criteria->getGroupby(); |
|
424 | } |
|
425 | $limit = $criteria->getLimit(); |
|
426 | $start = $criteria->getStart(); |
|
427 | } |
|
428 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
|
429 | $id = $this->_getIdForCache($sql, $start, $limit); |
|
430 | $cacheData = $Cache_Lite->get($id); |
|
@@ 471-478 (lines=8) @@ | ||
468 | require_once __DIR__ . '/lite.php'; |
|
469 | ||
470 | $sql = 'SELECT Sum(' . $field . ') as cpt FROM ' . $this->table; |
|
471 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
472 | $sql .= ' ' . $criteria->renderWhere(); |
|
473 | if ($criteria->groupby != '') { |
|
474 | $sql .= $criteria->getGroupby(); |
|
475 | } |
|
476 | $limit = $criteria->getLimit(); |
|
477 | $start = $criteria->getStart(); |
|
478 | } |
|
479 | $Cache_Lite = new references_Cache_Lite($this->cacheOptions); |
|
480 | $id = $this->_getIdForCache($sql, $start, $limit); |
|
481 | $cacheData = $Cache_Lite->get($id); |