"; 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 personal_tb pt, training_tb tt Where pt.StatusId='1' and pt.Teacher_code = tt.Teacher_code and tt.Year_std='$Year_std' and ( tt.Performance_1 ='การมุ่งผลสัมฤทธิ์' Or tt.Performance_2 ='การบริการที่ดี' Or tt.Performance_3 ='การสั่งสมความเชี่ยวชาญในงานอาชีพ' Or tt.Performance_4='จริยธรรม' Or tt.Performance_5='การทำงานเป็นทีม' ) and (tt.Training_std ='N' Or tt.Training_std ='Y' ) Group By pt.Teacher_code ORDER BY $OrderBy $ASCDESC ";
}
elseif( !isset($_GET['OrderBy']) ) {
$query = " SELECT * FROM personal_tb pt, training_tb tt Where pt.StatusId='1' and pt.Teacher_code = tt.Teacher_code and tt.Year_std='$Year_std' and ( tt.Performance_1 ='การมุ่งผลสัมฤทธิ์' Or tt.Performance_2 ='การบริการที่ดี' Or tt.Performance_3 ='การสั่งสมความเชี่ยวชาญในงานอาชีพ' Or tt.Performance_4='จริยธรรม' Or tt.Performance_5='การทำงานเป็นทีม' ) and (tt.Training_std ='N' Or tt.Training_std ='Y' ) Group By pt.Teacher_code ORDER BY $myTable2PK DESC ";
}
$query .= " LIMIT $start, $limit ";
$result = $dbObj->execQuery($query);
?>
|