Two Simple Questions. Please HELP

Discussion in 'PHP' started by oo7ml, Sep 23, 2007.

  1. #1
    1. In phpMyAdmin, i have created a table with 6 rows. However i want to change the row orders. As it stands it looks like this:

    Row1 Name
    Row2 DOB
    Row3 Email
    Row4 Gender
    Row5 Username
    Row6 Password

    however

    i want to change the "Gender" row around with "DOB"... Is this possible (i know it doesn't affect my site but i just want it like that for browsing reasons) (also i cannot delete the row and re-insert them because they already hold a lot of data)


    2. Another quick question: On my join form, the max length for "Username" is 20 characters. What way should i design my database. Should i use char(20) or char(21) for "Username"... should i add one extra length or not... don't ask me why i thought of this but i just want to be safe
     
    oo7ml, Sep 23, 2007 IP
  2. tamen

    tamen Peon

    Messages:
    182
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1: I don't think you can do that in phpmyadmin. But as you it's only cosmetic, it doesn't really martter what order they are in.

    2: I would use varchar for usernames. Again, it doesn't really matter. But if you really want it set it to 20.
     
    tamen, Sep 23, 2007 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Yes, it is varchar (but should i have 20 or 21 characters... should you allow an extra character to be safe
     
    oo7ml, Sep 23, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #4
    No need for that extra character.
     
    krt, Sep 23, 2007 IP
  5. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #5
    ok thanks for your help
     
    oo7ml, Sep 23, 2007 IP