crazycat503 7 Newbie Poster

Hi,

I want to build a search page much like beemp3.com. Not for music, but books. I have the following tables:

books (bookid,booktitle)
authors (authorid,authorname)
booksauthors (bookid,authorid)

Since a book could be written by multiple authors and the vice versa. Now, I need to see titles of books but the search must be done by both booktitle and authorname. That is, say, I have a book titled "The life of Eric" and author named "Eric". They could be associated or not. User types in Eric and the book must be returned. Also, any book that is written by author whose name includes Eric be returned in the same resultset.

Basically I want search: All, Book Title or By Author Name but what is displayed as a result of the query is book titles only.

I am not able to do that because if a Book don't have information about its authors, it is never returned. I want the book to be returned, if its title match, weather it got author information or not.

Any help?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.