if ($cursort != '') { if ($cursorttype == '1') { $cursort_type = 'ASC'; } else { $cursort_type = 'DESC'; } $orderBy = " {$cursort} {$cursort_type}"; } else { $orderBy = " orgtv.iVerifiedID DESC "; } ## ENDS HERE ### // echo $where; exit; $groupBy = " orgtv.iOrganizationID "; $limit = " LIMIT " . ($page - 1) * $REC_LIMIT_FRONT . ", " . $REC_LIMIT_FRONT . " "; $jtbl = "LEFT JOIN " . PRJ_DB_PREFIX . "_country_master cm on BINARY orgtv.vCountry=cm.vCountryCode"; $orglist = $orgvrfyObj->getJoinTableInfo($jtbl, "orgtv.iOrganizationID,orgtv.vCompanyName,orgtv.vOrganizationCode,orgtv.eOrganizationType,cm.vCountry,orgtv.eStatus,cm.vCountry", $where, $orderBy, $groupBy, $limit, 'yes'); //$orglist = $orgvrfyObj->getDetails_PG('*',$where,$orderBy,$groupBy,$limit); $count = $orglist['tot']; //prints($count);exit; unset($orglist['tot']); if (!isset($pgajxobj)) { require_once SITE_CLASS_GEN . "class.paging-ajax.php"; } $pgajxobj = new Paging($count, $page, "listorgs", $REC_LIMIT_FRONT); $paging = $pgajxobj->getListPG($page); $pgmsg = $pgajxobj->setMessage("Records"); // echo $paging; exit; $smarty->assign('count', $count); $smarty->assign('orglist', $orglist); $smarty->assign('paging', $paging); $smarty->assign('pgmsg', $pgmsg);