Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add column to table in mysql

Status
Not open for further replies.

raminr63

ISP
Sep 15, 2012
3
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.
 
Code:
[COLOR=#0022CC][b]ALTER TABLE[/b][/color] [COLOR=#882200][b]mytablename[/b][/color] [COLOR=#0022CC][b]ADD[/b][/color] [COLOR=#882200][b]column_name column_type[/b][/color];

NOTE: The user needs to have Altering privileges on the table in question.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
i use phpadmin.
i create a column and a XUID file in registration and member profile.

but after save the XUID column always is NULL ?!

what i can do?
how i can add "The user needs to have Altering privileges on the table in question".?
 
why i can not edit my post?!
my means in this line :
i create a column and a XUID file in registration and member profile

filed not file
 
I don't understand. If you add a new column that was not there before, the column is going to be empty until you insert values into it so all the rows will have Null in them, that is correct.

Just start adding values to the fields.


why i can not edit my post?!

Sorry, no edit feature here.

my means in this line :
[
i create a column and a XUID file in registration and member profile

Its a configuration for MYSQL, if you already created the column then its o.k. the user has the required privileges.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top