"; echo "
กรุณาทำการ Login ก่อน
execQuery($query); $numrows = $dbObj->_numrows; /** Paging */ $display = ( !isset ($_GET['page']) ) ? 1 : $_GET['page']; $start = ( ($display * $limit) - $limit ); /** Paging */ if( isset($_GET['OrderBy']) ) { if( $keyword != "" ) { // ใส่ Keyword $query = " SELECT * FROM research_tb rt, research_download rd WHERE rt.Research_code = rd.Research_code and rd.academic_year_finish='$academic_year_finish' and rd.CatId='$CatId' ORDER BY $OrderBy $ASCDESC "; } else { $query = " SELECT * FROM research_tb rt, research_download rd WHERE rt.Research_code = rd.Research_code and rd.academic_year_finish='$academic_year_finish' and rd.CatId='$CatId' ORDER BY $OrderBy $ASCDESC "; } } elseif( !isset($_GET['OrderBy']) ) { if( $keyword != "" ) { // ใส่ Keyword $query = " SELECT * FROM research_tb rt, research_download rd WHERE rt.Research_code = rd.Research_code and rd.academic_year_finish='$academic_year_finish' and rd.CatId='$CatId' ORDER BY $OrderBy $ASCDESC "; } else { $query = " SELECT * FROM research_tb rt, research_download rd WHERE rt.Research_code = rd.Research_code and rd.academic_year_finish='$academic_year_finish' and rd.CatId='$CatId' ORDER BY $OrderBy $ASCDESC "; } } $query .= " LIMIT $start, $limit "; $result = $dbObj->execQuery($query); ?> |