Question
MySQL, Keys, and the use of UNIQUE
I have built a MySQL table containing three fields:
1. RecordNum (Primary Key)
2. Keyword (TEXT)
3. Definition (TEXT)
This table contains data already. I now find that I neglected to consider
what would happen if someone tries to enter a second instance of the same
keyword!
What's the best way to extricate myself from this? 8)
I guess I need to re-index my table on unique keywords, but am not sure of
how to go about that, give that the table already contains data. I suppose
I could export the data, flush the table, and restructure it with the
keyword as the primary index?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
1. RecordNum (Primary Key)
2. Keyword (TEXT)
3. Definition (TEXT)
This table contains data already. I now find that I neglected to consider
what would happen if someone tries to enter a second instance of the same
keyword!
What's the best way to extricate myself from this? 8)
I guess I need to re-index my table on unique keywords, but am not sure of
how to go about that, give that the table already contains data. I suppose
I could export the data, flush the table, and restructure it with the
keyword as the primary index?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
