public void updatePatron(int cardNumber, Patron p) {
		Connection conn =null;
		Statement st = null;
		
		// If p is null, do nothing
		if (p == null)
			return;
		
		try {			
			conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/librarysystem?user=admin&password=123456");
			st=conn.createStatement();

			// Update all attributes
			st.executeUpdate("UPDATE Patron SET name = '" + p.getName() + "' WHERE cardNumber = '" + cardNumber + "'");
			st.executeUpdate("UPDATE Patron SET phone = '" + p.getPhone() + "' WHERE cardNumber = '" + cardNumber + "'");
			st.executeUpdate("UPDATE Patron SET address = '" + p.getAddress() + "' WHERE cardNumber = '" + cardNumber + "'");
			st.executeUpdate("UPDATE Patron SET unpaidFees = '" + p.getUnpaidFees() + "' WHERE cardNumber = '" + cardNumber + "'");
			st.executeUpdate("UPDATE Patron SET cardNumber = '" + p.getCardNumber() + "' WHERE cardNumber = '" + cardNumber + "'");
			
		} catch (SQLException e) {	
			e.getMessage();
		} finally {
			try {
				if (conn != null)
					conn.close();
				if (st != null)
					st.close();
			} catch (Exception e) {
			}
		}
	}