1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

field with individual data type possible? (mySQL, MariaDB)

Discussion in 'MySQL' started by iago111, Sep 6, 2020.

  1. #1
    Hello, I would like to create a table and incorporate an indivudal data typa: eg.: datatype 'state' with values like { 'pending', 'confirmed','declined' } How can I do this? Thanks!
     
    iago111, Sep 6, 2020 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You can set a default value eg New in the database but the control over what values the user chooses, or are assigned automatically as a work order progresses, is up in PHP or the scripting language you use.
     
    sarahk, Sep 6, 2020 IP
    iago111 likes this.
  3. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #3
    You can use this as "char" or "varchar" type. Then your php code sends values as you want, confirmed or pending or whatever else you want.
     
    JEET, Sep 15, 2020 IP
    iago111 likes this.