public String borrowBook(int isbn, int customerID, int day, int month, int year) {
		try{

			String result = formattedTitle("Borrow Book");

			// begin transaction
			conn.setAutoCommit(false);
			stmt = conn.createStatement();

			// check the customer exists and lock
			String sql = String.format("SELECT * FROM Customer WHERE CustomerID = %d FOR UPDATE;", customerID);
			res = stmt.executeQuery(sql);
			if(!res.isBeforeFirst()){
				conn.rollback();
				return result + String.format("\tCustomer %d does not exist.", customerID) + newLine();
			}
			res.next();
			String custName = String.format("%s %s",res.getString("F_Name").trim(), res.getString("L_Name").trim());

			// select the book and lock
			sql = String.format("SELECT * from Book where ISBN = %d FOR UPDATE;", isbn);
			res = stmt.executeQuery(sql);
			if(!res.isBeforeFirst()){
				conn.rollback();
				return result + String.format("\tBook %d does not exist.", isbn) + newLine();
			}
			res.next();
			String title = res.getString("Title").trim();
			
			// check that the book is available
			if(res.getInt("numLeft") == 0){
				conn.rollback();
				return result + String.format("\tThere are no copies of (%d) %s available.", isbn, title) + newLine();
			}

			// check that the customer isn't already borrowing it
			sql = String.format("SELECT * from Cust_Book WHERE CustomerId = %d;", customerID);
			res = stmt.executeQuery(sql);
			if(res.isBeforeFirst()){
				conn.rollback();
				return result + String.format("\tCustomer (%d) %s already has book (%d) %s on loan.", customerID, custName, isbn, title) + newLine();
			}

			// insert an entry into Cust_Book
			String date = String.format("%04d-%02d-%02d", year, month, day);
			sql = String.format("INSERT INTO Cust_Book (customerId, DueDate, ISBN) VALUES (%d, date '%s', %d);", customerID, date, isbn);
			int updated = stmt.executeUpdate(sql);
			if(updated != 1){
				conn.rollback();
				return result + "\tSomething weird happened. The book could not be borrowed";
			}

			// pause
			JOptionPane.showMessageDialog(dialogParent, "Paused. Press ok to continue.", "Paused", JOptionPane.OK_OPTION);

			// edit the numLeft in Book
			sql = String.format("UPDATE Book SET numLeft = numLeft - 1 WHERE ISBN = %d", isbn);
			updated = stmt.executeUpdate(sql);
			if(updated != 1){
				conn.rollback();
				return result + "\tSomething weird happened, and the book could not be borrowed" + newLine();
			}

			// commit
			conn.commit();

			return result + String.format("\t(%d) %s successfully borrowed (%d) %s.  Due back on %s.", customerID, custName, isbn, title, date) + newLine();

		} catch(SQLException e){
			JOptionPane.showMessageDialog(dialogParent, e.getMessage(), "Database Error", JOptionPane.ERROR_MESSAGE);
			return "";
		} finally{
			try {
				res.close();
				stmt.close();
			} catch (SQLException e) {
				e.printStackTrace();  // this shouldn't happen
			}
		}
	}