Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-12-2006, 10:05 PM
Rouzbeh1 Rouzbeh1 is offline
 
Join Date: Sep 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default ALTERing vb_user table structure?!

hi,
i am making my first product for vB, so i need to have some additional fields in the user table.
PHP Code:
ALTER TABLE `". TABLE_PREFIX ."user` ADD `canusesms` ENUM( 'yes', 'no', '1pd' ) NOT NULL DEFAULT 'no' ,
ADD `firstname` TEXT NOT NULL ,
ADD `lastname` TEXT NOT NULL ,
ADD `street` TEXT NOT NULL ,
ADD `zip` TEXT NOT NULL ,
ADD `city` TEXT NOT NULL ,
ADD `state` TEXT NOT NULL ,
ADD `country` TEXT NOT NULL ,
ADD `credits` VARCHAR( 255 ) NOT NULL DEFAULT '0',
ADD `mobile` VARCHAR( 25 ) NOT NULL ,
ADD `is_validated` char(1) default '0',
ADD `validation_code` text,
ADD `sentsms` varchar(255) default '0',
ADD `successfull_charges` varchar(255) default '0',
ADD `used_credits` varchar(255) NOT NULL default '0',
ADD `status` char(1) default '1',
ADD `signup_date` int(11) default '0',
ADD `last_login_ip` varchar(255) default NULL,
ADD `last_sms_ip` varchar(255) default NULL,
ADD `signup_ip` varchar(255) default NULL ; 
is this a good solution to change the default users table structure or should i find another way to store these.....?
Reply With Quote
  #2  
Old 11-12-2006, 11:03 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I would seriously suggest if you plan to store all of that data in the user table to prefix it with a name.

like rouz_firstname etc, that way if Jelsoft every adds their own fields that are the same as yours theres no direct conflicts. You could also add a new table and store your own data.
Reply With Quote
  #3  
Old 11-12-2006, 11:14 PM
Rouzbeh1 Rouzbeh1 is offline
 
Join Date: Sep 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

which one is better?
would it cause conflicts with other plugins or Vbulletin itself, if i store them in vb_user?

PS: thanks for the tip on using prefix
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:37 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.