Results 1 to 4 of 4

Thread: [RESOLVED] Enum?

  1. #1

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Resolved [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.

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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.

  4. #4

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    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
  •  



Click Here to Expand Forum to Full Width