|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: PJ (af.gourmet
videotron.ca)
Date: Sun Feb 22 2009 - 13:38:46 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 c.id. 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
page?
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?
Help...
--
Phil Jourdan --- pj
ptahhotep.com
http://www.ptahhotep.com
http://www.chiccantine.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]