@@ -72,7 +72,8 @@ class DaftarSeleksiController extends Controller
// Total records
$statement=" AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
$statementGlobal=" 1=1 AND (NIDN_REVIEWER_ID_1 = '".$noidentitas."' OR NIDN_REVIEWER_ID_2 = '".$noidentitas."')";
// $statementGlobal = " 1=1 AND (NIDN_REVIEWER_ID_1 = '".$noidentitas."' OR NIDN_REVIEWER_ID_2 = '".$noidentitas."')";
$statementGlobal=" 1=1 ";
if($administrasi!="0")
{
...
...
@@ -93,18 +94,23 @@ class DaftarSeleksiController extends Controller
$statementGlobal.=" AND PERIODE = '".$tahun."'";
}
$totalRecords=DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
// $totalRecords = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$totalRecordswithFilter=DaftarProposal::select('count(1) as allcount')
->whereRaw($statementGlobal.$statement)->count();
$totalRecords=collect(DB::select("select 1 as allcount from vw_daftar_proposal('".$noidentitas."') where ".$statementGlobal))->count();
// $totalRecordswithFilter = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal.$statement)->count();
$totalRecordswithFilter=collect(DB::select("select 1 as allcount from vw_daftar_proposal('".$noidentitas."') WHERE ".$statementGlobal.$statement))->count();
$records=collect(DB::select("select * from vw_daftar_proposal('".$noidentitas."') WHERE ".$statementGlobal.$statement." ORDER BY ".$columnName." ".$columnSortOrder))