这是一个图书馆管理系统的jsp代码
源代码在线查看: borrowsearch.jsp~12~
Search Borrow
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
Adduser
Modifyuser
Deletuser
Searchuser
Addbook
Deletebook
Borrowsearch
Search
Userpay
Update
Search Borrow
ID:
***
int number1=0;
try{
if(request.getParameter("enter")!=null){
String id = request.getParameter("borrowsearchid");
Library.setbsid(id);
Connection conn=Library.getConn();
Statement stmt=conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from borrowbook where id ='" + id + "'");
while (rs.next()){
number1++;
}
Library.setmaxnumber1(number1);
if(Library.getmaxnumber1()!=0){
Statement stmt1=conn.createStatement();
ResultSet rs1 = stmt1.executeQuery("select * from borrowbook where id ='" + id + "'");
if(rs1.next()){
Library.setbsserialnumber(rs1.getString("serialnumber"));
Library.setbssortnumber(rs1.getString("sortnumber"));
Library.setbstitle(rs1.getString("title"));
Library.setbsborrowdata(rs1.getString("borrowdata"));
Library.setbsshouldreturndata(rs1.getString("shouldreturndata"));
Library.setbsreturndata(rs1.getString("returndata"));
Library.setbsoverdata(rs1.getString("overdata"));
Library.setbsfee(rs1.getString("fee"));
Library.setbsreturnmoney(rs1.getString("returnmoney"));
Library.setnumber1(1);}
}
response.sendRedirect("borrowsearchresults.jsp");
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
%>