"; echo "
กรุณาทำการ Login ก่อน
execQuery($query); $numrows = $dbObj->_numrows; /** Paging */ $display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page']; $start = ( ($display * $limit) - $limit ); /** Paging */ if( isset($_GET['OrderBy']) ) { $query = " SELECT * FROM dev_hrperson dp, dev_his dh Where dp.statusId='1' and dh.perid=dp.perid and dh.Year_std='$Year_std' and dh.Content ='401' Or dh.Content ='402' Or dh.Content ='403' Or dh.Content ='404' Or dh.Content ='405' Or dh.Content ='406' Or dh.Content ='407' Group By dh.Content ORDER BY $OrderBy $ASCDESC "; } elseif( !isset($_GET['OrderBy']) ) { $query = " SELECT * FROM dev_hrperson dp, dev_his dh Where dp.statusId='1' and dh.perid=dp.perid and dh.Year_std='$Year_std' and dh.Content ='401' Or dh.Content ='402' Or dh.Content ='403' Or dh.Content ='404' Or dh.Content ='405' Or dh.Content ='406' Or dh.Content ='407' Group By dh.Content ORDER BY $myTable2PK DESC "; } $query .= " LIMIT $start, $limit "; $result = $dbObj->execQuery($query); ?> |