|
-
Mar 14th, 2007, 05:49 PM
#1
[RESOLVED] Enum?
For each user's account on my website, they can select multiple account types, ie: Artist, Musician, Director, etc...
What would be the appropriate value to use for this field in the MySQL database? ENUM?
Or can ENUM only be one value?
I'd rather not have to make another table just for the account types.
-
Mar 14th, 2007, 06:28 PM
#2
Re: Enum?
an enum field can have multiple selections but only one value.
a set field can have multiple selections and multiple values.
what you want is the set field.
edit: keep in mind that when you insert values into a set field, they are comma delimited (ie. value1,value2,value3)
Last edited by kows; Mar 14th, 2007 at 06:31 PM.
-
Mar 15th, 2007, 07:19 AM
#3
Re: Enum?
Make another table for the account types. It's more flexible if you ever need to change them.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 15th, 2007, 07:08 PM
#4
Re: [RESOLVED] Enum?
Thanks, I may just use the SET field since the account types won't change that often. If they do then I'll probably consider making another table.
Thanks again to both of you. It says I have to spread the rep thing around before giving it to you again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|