Jump to content

Mysql Table Structure


dbutler
 Share

Recommended Posts

I'm creating a database with two tables. the first table is a "user" table where I store registered users information. this table uses userid as a primary key such that each user exists only once. The second table is a table of general ledger id's (5 digit id's that represent accounting profit/loss centers). Now for the tricky part; an individual user could have just one or even 100 general ledger id's that they are capable of viewing. How do I set up the user table to account for "N" number of general ledger id's per user? Do I create 100's of columns in the user table to account for each general ledger id or is there a more creative way to handle this? Your help appreciated!!!! drb

Link to comment
Share on other sites

  • 3 weeks later...

How can i edit my table???For example ive created a table...id auto increment, user,email,passcan i chage it toid auto increment unique, user unique,email,passi dont want to export data to a new table

Link to comment
Share on other sites

can i start table with id = 0????CREATE TABLE `users` (`id` int(25) auto_increment,`Created` varchar(25) NOT NULL,`login` varchar(25) NOT NULL,`psw` varchar(25) NOT NULL,`email` varchar(25) NOT NULL,`nick` varchar(25) NOT NULL,PRIMARY KEY (id)) ENGINE=MyISAM DEFAULT CHARSET=latin1when i INSERT it starts with 1 if i UPDATE it to 0 table still carry ons from 2....any way????

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...