DB design
| From: | Tom Harris | Date: | Wed, 20 Dec 2000 17:44:21 +0000 |
| Subject: | DB design | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-5364@lists.php.net to get a copy of this message | ||
Here's my problem...
Each item in my database can belong to several of 50 categories. Right now
I'm using a text field which contains a string of letters representing each
category. (i.e. item A belongs to categories one and five so it's category
field is " ONE FIV " To find data I use a select statement with a WHERE
category LIKE "% FIV %" which gets everything that belongs to category 5.)
What I want to know is there a better way to do this? It is possible that
the number of categories will double in the near future. I'm using PHP
4.0.3 and MySQL 3.22.32 to create a dynamic website, right now it's getting
may hits, but it is possible that could change as well.
Thanks,
-Tom