$pointSQL = " SELECT *
FROM `evaulation`.`point_sub` point, `regist_student`.`student`std
WHERE point.SCODE = std.SCODE
AND point.SUB_CODE = '".$courseID."'
AND point.RNAME = '".$room."'
AND point.MYEAR = '".$year."'
AND point.TERM = '".$term."' ";
if($_POST['txtSearch']){
$pointSQL.="AND (point.grade LIKE '%".trim($_POST['txtSearch'])."%'
OR std.SNAME LIKE '%".trim($_POST['txtSearch'])."%' ."
else if($_POST['search_point']== "POINT1"){."OR point.POINT1 LIKE '%".trim($_POST['search_point'])."%') ".}."
." else if($_POST['search_point']== "C_POINT"){." OR point.C_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "POINT2"){." OR point.POINT2 LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "H_POINT"){." OR point.H_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "F_POINT"){." OR point.F_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "total_p"){." OR point.total_p LIKE '%".trim($_POST['search_point'])."%') ."} ."
ORDER BY point.SCODE ASC ";
}
$point = mysql_query($pointSQL);
$pointSQL = " SELECT *
FROM `evaulation`,`point_sub` point, `regist_student`,`student`std
WHERE point.SCODE = std.SCODE
AND point.SUB_CODE = '".$courseID."'
AND point.RNAME = '".$room."'
AND point.MYEAR = '".$year."'
AND point.TERM = '".$term."' ";
if($_POST['txtSearch']){
$pointSQL.="AND (point.grade LIKE '%".trim($_POST['txtSearch'])."%'
OR std.SNAME LIKE '%".trim($_POST['txtSearch'])."%' ."
else if($_POST['search_point']== "POINT1"){."OR point.POINT1 LIKE '%".trim($_POST['search_point'])."%') ".}."
." else if($_POST['search_point']== "C_POINT"){." OR point.C_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "POINT2"){." OR point.POINT2 LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "H_POINT"){." OR point.H_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "F_POINT"){." OR point.F_POINT LIKE '%".trim($_POST['search_point'])."%') ."} ."
." else if($_POST['search_point']== "total_p"){." OR point.total_p LIKE '%".trim($_POST['search_point'])."%') ."} ."
ORDER BY point.SCODE ASC ";
}
$point = mysql_query($pointSQL);