I've been searching for a while now on how to do this. I have a book database. The way it is set up there are categories and sub-categories. Each book is able to fit in more than one category/sub-category for searching purposes. The fields I have for each book are the book_id, title, author, isbn, category_id, owner_id, location_id, sub_category_id, and rating. Each sub_cat_id is different (duh) and each category has many sub categories.
For example - a book Called MySQL & mSQL could fit in the database category in sub-categories mysql, msql, and sql and also fit in the programming category in sub-categories mysql, msql, and sql. This would mean that one book would have 6 different listings. Some books would have more.
I'm not sure how to perform a search for a book and have it only show the book once if a person, for example, does a seach on the ISBN and doesn't pick a category/sub-category. I'm completely lost. I hope I explained this semi-well, if not I can try to explain more.
Thnx a lot