Files
luos/workflow/engine/classes/model/ListParticipatedLast.php

483 lines
20 KiB
PHP
Raw Normal View History

2014-11-07 17:19:35 -04:00
<?php
// @codingStandardsIgnoreStart
2014-11-07 17:19:35 -04:00
require_once 'classes/model/om/BaseListParticipatedLast.php';
/**
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' table.
*
*
2014-11-07 17:19:35 -04:00
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*/
2014-11-07 17:19:35 -04:00
class ListParticipatedLast extends BaseListParticipatedLast
{
2017-04-21 12:04:57 -04:00
private $additionalClassName = '';
2014-11-07 17:19:35 -04:00
/**
* Create List Participated History Table.
2014-11-07 17:19:35 -04:00
*
* @param type $data
*
* @return type
2014-11-07 17:19:35 -04:00
*/
public function create($data)
{
2015-02-06 14:57:59 -04:00
$criteria = new Criteria();
$criteria->addSelectColumn(ApplicationPeer::APP_STATUS);
$criteria->add(ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL);
2015-02-06 14:57:59 -04:00
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_STATUS'] = $aRow['APP_STATUS'];
2015-02-06 14:57:59 -04:00
if ($data['USR_UID'] != 'SELF_SERVICES') {
if ($data['USR_UID'] != '') {
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add(UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL);
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$data['DEL_CURRENT_TAS_TITLE'] = $data['APP_TAS_TITLE'];
}
} else {
$getData['USR_UID'] = $data['USR_UID_CURRENT'];
$getData['APP_UID'] = $data['APP_UID'];
$row = $this->getRowFromList($getData);
if (is_array($row) && sizeof($row)) {
$set = array(
'DEL_CURRENT_USR_USERNAME' => '',
'DEL_CURRENT_USR_FIRSTNAME' => '',
'DEL_CURRENT_USR_LASTNAME' => '',
'APP_TAS_TITLE' => $data['APP_TAS_TITLE'],
'DEL_CURRENT_TAS_TITLE' => $data['APP_TAS_TITLE'], );
$this->updateCurrentUser($row, $set);
}
}
if ($this->primaryKeysExists($data)) {
return;
}
if (!empty($data['PRO_UID']) && empty($data['PRO_ID'])) {
$p = new Process();
$data['PRO_ID'] = $p->load($data['PRO_UID'])['PRO_ID'];
2017-02-20 11:15:23 -04:00
}
if (!empty($data['USR_UID'])) {
$u = new Users();
2017-02-23 10:51:09 -04:00
$data['USR_ID'] = $data['USR_UID']==='SELF_SERVICES' ? null : $u->load($data['USR_UID'])['USR_ID'];
2017-02-20 11:15:23 -04:00
}
2017-02-20 13:08:08 -04:00
if (!empty($data['TAS_UID'])) {
$t = new Task();
2017-02-20 13:08:08 -04:00
$data['TAS_ID'] = $t->load($data['TAS_UID'])['TAS_ID'];
}
if (!empty($data['APP_STATUS'])) {
$data['APP_STATUS_ID'] = Application::$app_status_values[$data['APP_STATUS']];
}
$con = Propel::getConnection(ListParticipatedLastPeer::DATABASE_NAME);
2014-11-07 17:19:35 -04:00
try {
$this->fromArray($data, BasePeer::TYPE_FIELDNAME);
2014-11-07 17:19:35 -04:00
if ($this->validate()) {
$result = $this->save();
} else {
$e = new Exception('Failed Validation in class '.get_class($this).'.');
2014-11-07 17:19:35 -04:00
$e->aValidationFailures = $this->getValidationFailures();
throw ($e);
}
$con->commit();
2014-11-07 17:19:35 -04:00
return $result;
} catch (Exception $e) {
2014-11-07 17:19:35 -04:00
$con->rollback();
throw ($e);
}
}
/**
* Update List Participated History Table.
2014-11-07 17:19:35 -04:00
*
* @param type $data
*
2014-11-07 17:19:35 -04:00
* @return type
*
2014-11-07 17:19:35 -04:00
* @throws type
*/
public function update($data)
{
2015-02-27 16:27:11 -04:00
$data['DEL_THREAD_STATUS'] = (isset($data['DEL_THREAD_STATUS'])) ? $data['DEL_THREAD_STATUS'] : 'OPEN';
if (!empty($data['USR_UID'])) {
$u = new Users();
$data['USR_ID'] = $data['USR_UID'] === 'SELF_SERVICES' ? null : $u->load($data['USR_UID'])['USR_ID'];
2017-02-20 11:15:23 -04:00
}
2017-02-20 13:08:08 -04:00
if (!empty($data['TAS_UID'])) {
$t = new Task();
2017-02-20 13:08:08 -04:00
$data['TAS_ID'] = $t->load($data['TAS_UID'])['TAS_ID'];
}
if (!empty($data['APP_STATUS'])) {
$data['APP_STATUS_ID'] = Application::$app_status_values[$data['APP_STATUS']];
}
$con = Propel::getConnection(ListParticipatedLastPeer::DATABASE_NAME);
2014-11-07 17:19:35 -04:00
try {
$con->begin();
$this->setNew(false);
$this->fromArray($data, BasePeer::TYPE_FIELDNAME);
2014-11-07 17:19:35 -04:00
if ($this->validate()) {
$result = $this->save();
$con->commit();
2014-11-07 17:19:35 -04:00
return $result;
} else {
$con->rollback();
throw (new Exception('Failed Validation in class '.get_class($this).'.'));
2014-11-07 17:19:35 -04:00
}
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
2015-02-27 16:27:11 -04:00
/**
* Refresh List Participated Last.
2015-02-27 16:27:11 -04:00
*
* @param type $seqName
*
2015-02-27 16:27:11 -04:00
* @return type
*
* @throws type
2015-02-27 16:27:11 -04:00
*/
public function refresh($data, $isSelfService = false)
{
2015-02-27 16:27:11 -04:00
$data['APP_STATUS'] = (empty($data['APP_STATUS'])) ? 'TO_DO' : $data['APP_STATUS'];
if (!empty($data['USR_UID'])) {
$u = new Users();
$data['USR_ID'] = $data['USR_UID'] === 'SELF_SERVICES' ? null : $u->load($data['USR_UID'])['USR_ID'];
}
if (!empty($data['TAS_UID'])) {
$t = new Task();
$data['TAS_ID'] = $t->load($data['TAS_UID'])['TAS_ID'];
}
if (!empty($data['APP_STATUS'])) {
$data['APP_STATUS_ID'] = Application::$app_status_values[$data['APP_STATUS']];
}
if (!$isSelfService) {
if ($data['USR_UID'] == '') {
return;
}
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add(UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL);
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
//Update - WHERE
$criteriaWhere = new Criteria('workflow');
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL);
//Update - SET
$criteriaSet = new Criteria('workflow');
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME, $aRow['USR_USERNAME']);
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME, $aRow['USR_FIRSTNAME']);
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME, $aRow['USR_LASTNAME']);
if (isset($data['APP_TAS_TITLE'])) {
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_TAS_TITLE, $data['APP_TAS_TITLE']);
}
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection('workflow'));
}
$this->update($data);
2015-02-27 16:27:11 -04:00
}
2014-11-07 17:19:35 -04:00
/**
* Remove List Participated History.
2014-11-07 17:19:35 -04:00
*
* @param type $seqName
*
2014-11-07 17:19:35 -04:00
* @return type
*
* @throws type
2014-11-07 17:19:35 -04:00
*/
public function remove($app_uid, $usr_uid, $del_index)
2014-11-07 17:19:35 -04:00
{
try {
if (!is_null(ListParticipatedLastPeer::retrieveByPK($app_uid, $usr_uid, $del_index))) {
$criteria = new Criteria('workflow');
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $del_index);
$result = ListParticipatedLastPeer::doDelete($criteria);
} else {
$criteria = new Criteria('workflow');
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
$rsCriteria = ListParticipatedLastPeer::doSelectRS($criteria);
if ($rsCriteria->next()) {
$criteria2 = clone $criteria;
$result = ListParticipatedLastPeer::doDelete($criteria2);
}
}
2014-11-07 17:19:35 -04:00
} catch (Exception $e) {
throw $e;
2014-11-07 17:19:35 -04:00
}
}
2017-04-21 12:04:57 -04:00
/**
* This function add restriction in the query related to the filters
* @param Criteria $criteria, must be contain only select of columns
* @param array $filters
* @param array $additionalColumns information about the new columns related to custom cases list
* @throws PropelException
*/
public function loadFilters(&$criteria, $filters, $additionalColumns = array())
2014-11-07 17:19:35 -04:00
{
$filter = isset($filters['filter']) ? $filters['filter'] : '';
$search = isset($filters['search']) ? $filters['search'] : '';
$caseLink = isset($filters['caseLink']) ? $filters['caseLink'] : '';
$process = isset($filters['process']) ? $filters['process'] : '';
$category = isset($filters['category']) ? $filters['category'] : '';
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : '';
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : '';
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : '';
$newestthan = isset($filters['newestthan']) ? $filters['newestthan'] : '';
$oldestthan = isset($filters['oldestthan']) ? $filters['oldestthan'] : '';
2014-11-07 17:19:35 -04:00
2017-02-10 12:27:28 -04:00
//Filter Started by me and Completed by me
2017-02-09 15:17:13 -04:00
switch ($filter) {
2017-02-09 19:12:40 -04:00
case 'started':
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, 1, Criteria::EQUAL);
2017-02-09 15:17:13 -04:00
break;
2017-02-09 19:12:40 -04:00
case 'completed':
$criteria->add(ListParticipatedLastPeer::APP_STATUS, 'COMPLETED', Criteria::EQUAL);
2017-02-09 15:17:13 -04:00
break;
2014-11-07 17:19:35 -04:00
}
2017-02-10 12:27:28 -04:00
//Check the inbox to call
switch ($filterStatus) {
case 'DRAFT':
$criteria->add(ListParticipatedLastPeer::APP_STATUS, 'DRAFT', Criteria::EQUAL);
break;
2017-02-10 12:27:28 -04:00
case 'TO_DO':
$criteria->add(ListParticipatedLastPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
break;
2017-02-10 12:27:28 -04:00
case 'COMPLETED':
$criteria->add(ListParticipatedLastPeer::APP_STATUS, 'COMPLETED', Criteria::EQUAL);
break;
2017-02-10 12:27:28 -04:00
case 'CANCELLED':
$criteria->add(ListParticipatedLastPeer::APP_STATUS, 'CANCELLED', Criteria::EQUAL);
break;
2017-02-10 12:27:28 -04:00
}
2014-11-07 17:19:35 -04:00
2017-04-21 12:04:57 -04:00
//Filter Search
if ($search != '') {
//Check if we need to search to the APP_UID
if (!empty($caseLink)) {
$criteria->add(ListParticipatedLastPeer::APP_UID, $search, Criteria::EQUAL);
} else {
//If we have additional tables configured in the custom cases list, prepare the variables for search
2017-06-02 12:26:03 -04:00
$casesList = new \ProcessMaker\BusinessModel\Cases();
2017-06-05 10:33:42 -04:00
$casesList->getSearchCriteriaListCases($criteria, __CLASS__ . 'Peer', $search, $this->additionalClassName, $additionalColumns);
2017-04-21 12:04:57 -04:00
}
}
2017-04-21 12:04:57 -04:00
//Filter Process Id
2014-11-07 17:19:35 -04:00
if ($process != '') {
$criteria->add(ListParticipatedLastPeer::PRO_UID, $process, Criteria::EQUAL);
2014-11-07 17:19:35 -04:00
}
2017-04-21 12:04:57 -04:00
//Filter Category
2014-11-07 17:19:35 -04:00
if ($category != '') {
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
$aConditions = array();
2014-11-07 17:19:35 -04:00
$aConditions[] = array(ListParticipatedLastPeer::PRO_UID, ProcessPeer::PRO_UID);
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'".$category."'");
2014-11-07 17:19:35 -04:00
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
}
2017-03-22 15:24:51 -04:00
//Those filters: $newestthan, $oldestthan is used from mobile GET /light/participated
if ($newestthan != '') {
$criteria->add( $criteria->getNewCriterion( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $newestthan, Criteria::GREATER_THAN ));
}
if ($oldestthan != '') {
$criteria->add( $criteria->getNewCriterion( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $oldestthan, Criteria::LESS_THAN ));
}
2014-11-07 17:19:35 -04:00
}
2017-04-21 12:04:57 -04:00
/**
* This function get the information in the corresponding cases list
* @param string $usr_uid, must be show cases related to this user
* @param array $filters for apply in the result
* @param null $callbackRecord
* @param string $appUid related to the specific case
* @return array $data
* @throws PropelException
*/
2016-08-30 14:56:18 -04:00
public function loadList($usr_uid, $filters = array(), $callbackRecord = null, $appUid = '')
2014-11-07 17:19:35 -04:00
{
$pmTable = new PmTable();
$criteria = $pmTable->addPMFieldsToList('sent');
2017-04-21 12:04:57 -04:00
$this->additionalClassName = $pmTable->tableClassName;
2017-06-02 12:29:07 -04:00
$additionalColumns = $criteria->getSelectColumns();
2016-08-30 14:56:18 -04:00
2014-11-07 17:19:35 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_UID);
2015-02-27 16:27:11 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
2014-11-07 17:19:35 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::USR_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::TAS_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::PRO_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_NUMBER);
2016-10-13 10:50:59 -04:00
$criteria->addSelectColumn(ApplicationPeer::APP_TITLE);
2014-11-07 17:19:35 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_STATUS);
2014-11-07 17:19:35 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME);
2015-02-06 14:57:59 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_TAS_TITLE);
2014-11-07 17:19:35 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PRIORITY);
2015-02-27 16:27:11 -04:00
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_THREAD_STATUS);
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid, Criteria::EQUAL);
2016-08-30 14:56:18 -04:00
//Check if the user was participated in a specific case
if ($appUid != '') {
$criteria->add(ListParticipatedLastPeer::APP_UID, $appUid, Criteria::EQUAL);
2016-08-30 14:56:18 -04:00
}
2017-04-21 12:04:57 -04:00
self::loadFilters($criteria, $filters, $additionalColumns);
2014-11-07 17:19:35 -04:00
$sort = (!empty($filters['sort'])) ?
ListParticipatedLastPeer::TABLE_NAME.'.'.$filters['sort'] :
'DEL_DELEGATE_DATE';
$dir = isset($filters['dir']) ? $filters['dir'] : 'ASC';
$start = isset($filters['start']) ? $filters['start'] : '0';
$limit = isset($filters['limit']) ? $filters['limit'] : '25';
2014-11-07 17:19:35 -04:00
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
if ($dir == 'DESC') {
2014-11-07 17:19:35 -04:00
$criteria->addDescendingOrderByColumn($sort);
} else {
$criteria->addAscendingOrderByColumn($sort);
}
if ($paged == 1) {
$criteria->setLimit($limit);
$criteria->setOffset($start);
2014-11-07 17:19:35 -04:00
}
$criteria->addJoin(ListParticipatedLastPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
2016-10-13 10:50:59 -04:00
$dataset = ListParticipatedLastPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro'));
2014-11-07 17:19:35 -04:00
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$data = array();
$aPriorities = array('1' => 'VL', '2' => 'L', '3' => 'N', '4' => 'H', '5' => 'VH');
2014-11-07 17:19:35 -04:00
while ($dataset->next()) {
$aRow = (is_null($callbackRecord)) ? $dataset->getRow() : $callbackRecord($dataset->getRow());
$aRow['DEL_PRIORITY'] = (
isset($aRow['DEL_PRIORITY']) &&
is_numeric($aRow['DEL_PRIORITY']) &&
$aRow['DEL_PRIORITY'] <= 5 &&
$aRow['DEL_PRIORITY'] > 0) ? $aRow['DEL_PRIORITY'] : 3;
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
2014-11-07 17:19:35 -04:00
$data[] = $aRow;
}
return $data;
}
public function primaryKeysExists($data)
{
$criteria = new Criteria('workflow');
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $data['DEL_INDEX']);
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
if (is_array($aRow)) {
if (sizeof($aRow)) {
return true;
}
}
return false;
}
public function getRowFromList($data)
{
$criteria = new Criteria('workflow');
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
if (is_array($aRow)) {
if (sizeof($aRow)) {
return $aRow;
}
}
return false;
}
public function updateCurrentUser($where, $set)
{
$con = Propel::getConnection('workflow');
//Update - WHERE
$criteriaWhere = new Criteria('workflow');
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $where['APP_UID'], Criteria::EQUAL);
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $where['USR_UID'], Criteria::EQUAL);
$criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $where['DEL_INDEX'], Criteria::EQUAL);
//Update - SET
$criteriaSet = new Criteria('workflow');
foreach ($set as $k => $v) {
eval('$criteriaSet->add( ListParticipatedLastPeer::'.$k.',$v, Criteria::EQUAL);');
}
BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con);
}
/**
* Returns the number of cases of a user.
*
2017-02-09 15:17:13 -04:00
* @param string $usrUid
* @param array $filters
*
* @return int
*/
2017-02-09 15:17:13 -04:00
public function getCountList($usrUid, $filters = array())
{
$criteria = new Criteria();
2017-02-09 15:17:13 -04:00
$criteria->addSelectColumn('COUNT(*) AS TOTAL');
$criteria->add(ListParticipatedLastPeer::USR_UID, $usrUid, Criteria::EQUAL);
2017-02-09 15:17:13 -04:00
if (count($filters)) {
self::loadFilters($criteria, $filters);
}
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
return (int) $aRow['TOTAL'];
}
2014-11-07 17:19:35 -04:00
}