0

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 ;

Edited by pritaeas: Moved to MySQL.

3
Contributors
3
Replies
14
Views
4 Years
Discussion Span
Last Post by pritaeas
0

So if i understand, it lets you create more than one user with the same name ?

Edited by Szabi Zsoldos

0

i want to creat a single username in my data base
if ' James " already taken then it will not be register for franchisor , distributor , seller

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.