my teacher wants us to create a php codes that can serve as a library. only searching for books the user wants to see.
We can help you, but it looks like you skipped the first step. Do you have any codes organization in mind? You should give us some of your ideas, even a simple diagram of your program design.
here are the hints. Write all the possible events when the user landed on the presentation interface of your program, then put a note where the data from the database are needed. Based on this diagram of design flow, you should be able to visualize how the database table should look like as far as the columns are concern. For example, cols: title, ISBN, author, publisher, date of publication, tags, description, reviews, number of reviews, number of people who read the book, and many other things.
Write this on a piece of paper and then draw your block diagram. It is not necessary which type you use. It could be control flow, data flow etc. etc..
Just have something that shows your motivation and willingness to do your part, before we do our part of helping. You do that and I promise I will take my time walking you through the codes, until you either understand how it works or you just had enough of my blabbering.