日期:2014-05-18 浏览次数:20745 次
String sqlString=" "; String teacherName=request.getParameter("teacherName"); String technicalPosition=request.getParameter("technicalPositionSelect"); String department=request.getParameter("departmentSelect"); if(request.getParameter("teacherName")!=null && request.getParameter("teacherName")!="") { sqlString=sqlString+ "and T_name='teacherName'"; } if(request.getParameter("technicalPositionSelect")!=null&&request.getParameter("technicalPositionSelect")!="") { sqlString=sqlString + " and T_technicalposition='technicalPosition'"; } if(request.getParameter("departmentSelect")!=null&&request.getParameter("departmentSelect")!="") { sqlString=sqlString + " and T_department='department'"; } ResultSet rs=db.executeQuery("select * from teacher " +" where 1=1 " +sqlString+" order by T_name desc " String teacherId=""; while(rs.next()) { teacherId=rs.getString("Id"); out.println("<tr height=22>"); out.println("<td align=center>"+rs.getString("T_name")+"</td>"); out.println("<td align=center>"+rs.getString("T_technicalposition")+"</td>"); out.println("<td align=center>"+rs.getString("T_department")+"</td>"); %> <td align="center"<a href="teacherModify.jsp?teacherId=<%=teacherId%>"> 修改</a> <a href="javascript:del('teacherManage.jsp',<%=teacherId%>)">删除</a></td></tr> }