Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add column to table in mysql

    hi. guys i use mybb as the group creator for my site.
    i want to add a column named xuid in the mybb_users table so when users want to register in my site put their xuid that contains 16 digits and words and be saved in this column
    so please give me the code for adding the xuid column to the mybb_users table.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    ALTER TABLE mybb_users ADD COLUMN xuid char(16) assuming that when you mean 16 digits and words you mean 16 characters.
    For more reference: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
    Of course you'll need to write the PHP code to actually do something with it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •