Jump to content

MySQL table help


csabi_fl

Recommended Posts

Usually you have a unique id, then a username, password, e-mail, ect, ect

Here is an export of one of my tables

[code]CREATE TABLE `employees` (
  `EmployeeID` int(11) unsigned NOT NULL auto_increment,
  `FirstName` varchar(50) default NULL,
  `LastName` varchar(50) default NULL,
  `Initials` varchar(50) default NULL,
  `userid` varchar(100) default '',
  `password` varchar(100) default '',
  `accessrights` varchar(50) default '1',
  `active` tinyint(1) NOT NULL default '1',
  `email` varchar(50) default NULL,
  PRIMARY KEY  (`EmployeeID`),
  UNIQUE KEY `unique` (`userid`)
) ENGINE=MyISAM;[/code]

With this you have a unique key "EmployeeID" and also a unique username. You can obviously change the field names and such to your needs.

Ray
Link to comment
https://forums.phpfreaks.com/topic/25810-mysql-table-help/#findComment-117871
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.