visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: Database design HELP !!!


By: Squibi U.S.A.  Date: 10/03/2003 00:00:00  English  Points: 300 Status: Answered
Quality : Excellent
Hi all, I would like to get help from you experts. I am now designing a database table, I encounter a question. Which is, e.g. They system is going to have many users, each user will have there own choice to choose from various category to make orders online. They use checkbox to select which category they want to see on the web page. If there are only 5 FIXED category, I will be fine, I can just create 5 fields to handle it. But the problem is the category can be create unlimitly by the administrator. So I got stuck here, how should I design it in order to make the best? PLEASE HELP. THANKS IN ADVANCE.
By: VGR Date: 10/03/2003 05:21:00 English  Type : Answer
either build a table summarizing the categories per clients' types (profiles) or per clients' ID,
or store a string composed of categories'codes separated by | in the client's record.
Display using PHP or javascript so that the number of checkboxes varies with the actual data from the client's record.

By: carchitect Date: 10/03/2003 05:41:00 English  Type : Comment
hi this is ur table structure

CREATE TABLE `category` (
`cat_id` tinyint(3) unsigned NOT NULL auto_increment,
`category` varchar(25) default NULL,
PRIMARY KEY (`cat_id`),
UNIQUE KEY `cat_id` (`cat_id`)
) TYPE=MyISAM;


create table and add values to it
then retrieve from there and create check boxes dynamically....


By: sumotimor Date: 13/03/2003 19:44:00 English  Type : Comment
Create a category table, place category info in it
Create a user table, store user information

Each has an auto-increment column that serves as primary key, or use category and user names as primary key.

create a link table that stores category and user primary key. This table allows users to have unlimited categories, then just join the three together through the link table to get a list of categories.

Let me know if you need more detail.

Sumotimor
By: Squibi Date: 13/03/2003 20:02:00 English  Type : Comment
Thanks for the help

Do register to be able to answer

EContact
browser fav
page generated in 369.621990 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page