switch($exams_data) { case "subject": $exams_query.= " and subjects.Subject like '%$subject%'"; break; case "surname": $exams_query.= " and professors.Surname like '%$surname%'"; break; } }
// 以下各行是用来为查询授课时间的sql语句增加查询限制
if ($consulting_data) { switch($consulting_data) { case "subject": $consulting_query .= " and subjects.Subject like '%$subject%'"; break; case "surname": $consulting_query.= " and professors.Surname like '%$surname%'"; break; } }