Jump to content

mysql user system tables.


bogdaniel

Recommended Posts

Can't see what would be difficult in here... anyway here's what I use in my current project.

 

CREATE TABLE  `users` (
  `ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `login` varchar(255) NOT NULL,
  `password` char(32) NOT NULL,
  `active` tinyint(1) NOT NULL COMMENT 'Is the account active?',
  `registrationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

Link to comment
Share on other sites

Can't see what would be difficult in here... anyway here's what I use in my current project.

 

CREATE TABLE  `users` (
  `ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `login` varchar(255) NOT NULL,
  `password` char(32) NOT NULL,
  `active` tinyint(1) NOT NULL COMMENT 'Is the account active?',
  `registrationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

 

hello it's not dificult i just wanted onther opinion to see how others did .. maybe someone did something more better. :D

Link to comment
Share on other sites

Well then. What you think about my table? ;)

it's nice i like it on my table i didn't had an active option and i've didn't add for the moment details about the user only username password registration date and i've made some changes about what i had changed vchar to char on password field. :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.