This commit is contained in:
Paula Quispe
2017-02-16 15:00:57 -04:00
parent df6b3ac4ae
commit 5dbd564af3
3 changed files with 18 additions and 16 deletions

View File

@@ -126,9 +126,16 @@ class Applications
$totalCount = $aRow['TOTAL'];
//Filters
if (!empty($sort)) {
if ($sort === 'APP_NUMBER' || $sort === 'APPLICATION.APP_NUMBER') {
$sort = 'APP_DELEGATION.APP_NUMBER';
if (!empty($sort)) {error_log($sort);
switch ($sort) {
case 'APP_NUMBER':
//The order by APP_DELEGATION.APP_NUMBER is must be fast than APPLICATION.APP_NUMBER
$sort = 'APP_DELEGATION.APP_NUMBER';
break;
case 'APP_CURRENT_USER':
//The column APP_CURRENT_USER is concat those fields
$sort = 'USR_LASTNAME, USR_FIRSTNAME';
break;
}
$sqlWhere .= " ORDER BY " . $sort;
}