<%@ page import="java.sql.*" %> Book List - Public Library System
Try our searching engine, Enter book title to match, Good Luck
<% DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@oracle:1521:orcl","dl75","dl75"); Statement stmt = conn.createStatement(); String userId = request.getParameter("userId"); String type = request.getParameter("type"); ResultSet r = stmt.executeQuery ("SELECT * FROM borrower WHERE borrowerId = " + userId); if(r.next()){ String name = r.getString(2); String address = r.getString(4); String email = r.getString(6); } %>

Your Details:

Name:<%= name %>
Type:<%= type %>

Book List

Choose a book to create loan, reservation...

<% DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@oracle:1521:orcl","dl75","dl75"); Statement stmt = conn.createStatement(); ResultSet r = stmt.executeQuery ("SELECT * FROM book"); String title, isbn, author, publisher, quantity, borrowPeriod; int count = 0; boolean show = false; %> <% while(r.next()){ if(count>20) break; isbn = r.getString(1); title = r.getString(2); author = r.getString(3); publisher = r.getString(4); quantity = r.getString(5); borrowPeriod = r.getString(6); %> <% count++; %> <% } %> <% r.close(); stmt.close(); conn.close(); %>
ISBNTitleAuthorPublisherQuantityBorrow Period
/><%= isbn %><%= title %> <%= author %><%= publisher %><%= quantity %> <%= borrowPeriod %>


Valid XHTML 1.0!