removeEmployeeProccessing.jsp
removeEmployeeProccessing
<%@ page import = "com.PrintToFile"%> <%@ page import= "java.io.*" %> <%@ page import= "java.sql.*" %> <%@ page import= "com.*"%> <% String[] NIC = request.getParameterValues("tic"); System.out.println("no NIC"); if(NIC == null) { System.out.println("nothing here"); %>
<% } int u = 0; while(u < NIC.length) { String company = (String)session.getAttribute("company"); //The employees employed marker is changed to zero so that althought their details //are kept on the system for future reference they are not included in future payrolls. String query = "UPDATE perse3 SET employed = 0 WHERE companyName like '"+company+"'AND NIC like '"+NIC[u]+"'"; Connection connection = ConnectionPool2.getConnection(); Statement statement = connection.createStatement(); statement.executeUpdate( query ); u++; } %>
<% %>