its my Data base structure , I want to create login for admin , franchisor , distributor , seller , its gives me a problem that when i take a user name 'David' for franchisor then can i also registor 'David' as a seller .
i want a user name piked up for any kind of user name will not be repeat in my data base . i have already take it with 5 tables bt its presist proble .
CREATE TABLE IF NOT EXISTS `members` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`country` varchar(255) NOT NULL,
`state` varchar(255) NOT NULL,
`city` varchar(255) NOT NULL,
`bio` text NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`signupdate` datetime NOT NULL,
`lastlogin` datetime NOT NULL,
`accounttype` enum('a','b','c','d','e') NOT NULL,
`emailactivated` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;