List:General Discussion« Previous MessageNext Message »
From:PJ Date:February 22 2009 7:38pm
Subject:book categories
View as plain text  
Here's a tough one...
In my library I have some 62 categories where a number of books can be
in several categories.
Now, to relate the "categories" table(AS c) to the "book" table (AS a),
I assume that I need an intermediate table "book_category" (AS d)
linking d.bookID to the b.bookID and d.categoryID to With so many
categories and (probably) thousands of books d may become quite lengthy
(but, I guess it's better than 62 * 100's of lengthy fields added to b).
To enter the relationships I would add instructions on my
addNewBooks.php form with the input as multiple choice dropdown box
(listing the categories)...
so far, so good (I hope)...
Now, how do I SELECT and retrieve these categories to display on the web
From the book_category table with a WHERE statement? If so, what then?
CONCAT_WS the stuff to go into the html table <td>?
I hope I'm on the right track... or am I in deep water?


Phil Jourdan --- pj@stripped

book categoriesPJ22 Feb
  • Re: book categoriesClaudio Nanni22 Feb
    • Re: book categoriesPJ23 Feb
  • RE: book categoriesJerry Schwartz23 Feb
    • Record IDsHagen Finley23 Feb
      • Re: Record IDsMattia Merzi23 Feb
      • Re: Record IDsBrent Baisley23 Feb
      • RE: Record IDsJerry Schwartz23 Feb