[thelist] database help

Tom Dell'Aringa pixelmech at yahoo.com
Tue Nov 19 12:12:01 CST 2002


In my DB I have a table that stores category fields. Items in another
table each have a categoryID pointing back to that table.

i.e. Table 'food' might have a category of 'color' and some colors
might be red and yellow. The food table has a colorID pointing back
to the color table.

Now, I have to allow my user to manage the categories. If the user
decides he doesn't want red in the categories anymore he deletes it.
Now of course we have trouble, since some of the food items were
pointing to red.

How do I best handle this when the user deletes a category? Do I set
all the red foods to a default value and let them know they changed?
Then they have to go back to each individual one and change them.

Should I bring up a list with all the ones that will change, with a
drop down right there to change it?

Main question, how do I handle it with the SQL ?

TIA

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



More information about the thelist mailing list