[eluser]tdktank59[/eluser]
This is what im using at the moment
Code:
CREATE TABLE IF NOT EXISTS `user` (
`user_id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(255) NOT NULL,
`email_address` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`register_date` int(10) unsigned NOT NULL,
`account_verificiation_code` varchar(255) NOT NULL,
`account_status` int(11) NOT NULL default '1',
`account_status_reason` text NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- Table structure for table `user_data`
--
CREATE TABLE IF NOT EXISTS `user_data` (
`user_id` int(10) unsigned NOT NULL auto_increment,
`donator_days` bigint(20) unsigned NOT NULL default '0',
`level` bigint(20) unsigned NOT NULL default '1',
`experience` decimal(10,4) unsigned NOT NULL default '0.0000',
`currency_main` bigint(20) unsigned NOT NULL default '1000',
`currency_secondary` bigint(20) unsigned NOT NULL default '25',
`vital_one` bigint(20) unsigned NOT NULL default '0',
`vital_two` bigint(20) unsigned NOT NULL default '0',
`vital_three` bigint(20) unsigned NOT NULL default '0',
`vital_four` bigint(20) unsigned NOT NULL default '0',
`vital_one_max` bigint(20) unsigned NOT NULL default '0',
`vital_two_max` bigint(20) unsigned NOT NULL default '0',
`vital_three_max` bigint(20) unsigned NOT NULL default '0',
`vital_four_max` bigint(20) unsigned NOT NULL default '0',
`stat_one` decimal(10,4) unsigned NOT NULL default '10.0000',
`stat_two` decimal(10,4) unsigned NOT NULL default '10.0000',
`stat_three` decimal(10,4) unsigned NOT NULL default '10.0000',
`stat_four` decimal(10,4) unsigned NOT NULL default '10.0000',
`stat_five` decimal(10,4) unsigned NOT NULL default '10.0000',
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- Table structure for table `user_group`
--
CREATE TABLE IF NOT EXISTS `user_group` (
`user_id` int(10) unsigned NOT NULL,
`group_id` int(10) unsigned NOT NULL default '1',
UNIQUE KEY `user_group` (`user_id`,`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Table structure for table `user_info`
--
CREATE TABLE IF NOT EXISTS `user_info` (
`user_id` int(10) unsigned NOT NULL auto_increment,
`aim` varchar(255) default NULL,
`yim` varchar(255) default NULL,
`msn` varchar(255) default NULL,
`icq` varchar(255) default NULL,
`skype` varchar(255) default NULL,
`website` varchar(255) default NULL,
`avatar` varchar(255) default NULL,
`signature` text,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- Table structure for table `user_verification_code`
--
CREATE TABLE IF NOT EXISTS `user_verification_code` (
`user_id` int(10) unsigned NOT NULL,
`email_address` varchar(255) NOT NULL,
`account_verification_code` varchar(255) NOT NULL,
UNIQUE KEY `user_id` (`user_id`),
UNIQUE KEY `account_verification_code` (`account_verification_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
However I will be changing this with my new ideas that I came up with last night. (its an old database)
Basicaly the user table is soly responsible for the user authentication
and everything else extends that user_info for contact info and so on. So basically just add another table is as simple as it gets