Dana Terrell wrote:

I am new to MySql and I am having troubles getting the primary keys to do
what I want.  Here is the situation.

I am building a database where there are 2 types of users that can access
and change information.  Because each type of user will be accessing a
different part of the database, I wanted to set it where Type 1 users got a
primary key "UserID" that was even, while Type 2 users got a "UserID" that
was odd.

Add another column for user type.
Encoding special meaning to certain values of an otherwise unrelated column is a bad idea.


I have set the auto-increment value in both registration forms to
2 but when I set the default in the type 1's to 2 and the type2's to 1, it
does not work and they are both getting the same numbers for their user id.


Auto increment fields increment by one, not the default value.

Is there something I am missing or is there a different field that I need to
set to make this work right or is this something that can't be done in
MySql?  Any help would be appreciated.

P.S. I am more familiar with MSSqlServer than I am with MySql, if that helps.  
I know how to do this in MSSqlServer but I am lost here.






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to