public static ArrayList<BookCopy> searchBookByAuthor(String author){
		
		try {
			   if(conn == null || conn.isClosed()){
			    conn = DatabaseConnection.getConnection();
			   }
			  } catch (SQLException e1) {
			   // TODO Auto-generated catch block
			   e1.printStackTrace();
			  }
		
		ArrayList<BookCopy> books = new ArrayList<BookCopy>();
		try {
			PreparedStatement stmnt = conn.prepareStatement("SELECT * FROM Books a, BookCopies b WHERE a.book_id = b.book_id AND author LIKE ? OR author LIKE ? AND a.book_id = b.book_id");
			stmnt.setString(1, author + "%");
			stmnt.setString(2, "% " + author + "%");
			
			
			ResultSet res;
			res = stmnt.executeQuery();
			while(res.next()){
				//Date yearEdition, String publicationPlace, String title String genre, String author, String iSBN, String publisher,int bookID
				bookCopy = new BookCopy(res.getDate("year"),res.getString("place_of_publication"),res.getString("title"),res.getString("genre"),res.getString("author"),res.getString("iSBN"),res.getString("publisher"),res.getInt("book_id"),res.getInt("copy_id"),res.getInt("edition"),res.getBoolean("lendable"));
				books.add(bookCopy);
			}
		}
			catch(SQLException e){
				e.printStackTrace();
				
				
			}
		
		return books;
	}