Re: Multiple entries in 1 field

From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Sun, 6 Oct 2019 09:18:37 +0100
Message-ID: <qnc80u$buf$1_at_dont-email.me>


On 06/10/2019 04:39, groovee_at_cyberdude.com wrote:
> So, say I have a "stories" db, with fields such as storyid, storytext, dateposted, and category. Now under "category" I want it to have MULTIPLE CATEGORIES, ie. *one* story can be classified as "sci-fi" AS WELL AS "romance" AT THE SAME TIME!! But I would like it to be queryable, ie. if I want to find all the "sci-fi" stories in the db, I should be able to do so. How can I do this? (I would kind of not like to fiddle with raw data structures when doing this type of thing.... - is there some way COMPLETELY inside MySQL?)
>
>
> Thanx :)
>
many tpo one achieved with a separate table of links that link the same title to different categories multiple times

i.e.
table books has fields book_id, title, ISBN , etc..... table links has fields category_id, title_id. table categories has fields category_id, category_name, category description etc etc..

-- 
"If you don’t read the news paper, you are un-informed. If you read the 
news paper, you are mis-informed."

Mark Twain
Received on Sun Oct 06 2019 - 10:18:37 CEST

Original text of this message