Jump to content

problem with unique fields


getcarty

Recommended Posts

I'm setting up a database table on my mySQL database (on a hosted server) and am having some trouble. 

 

One of the fields I need is 'years' - which is the amount of years that a member has been at a club.  The problem is that I set this field up as an INT, but when I click OK to setup the new table (i'm using phpmyadmin) it sets it to 'unique' and i can't find any way to turn this off.  obviously this is bad because it won't let me enter members into the database that have been at the club for the same amount of years because it needs each one to be unique

 

i'm totally new to mysql (only started today) so any help with this would be much appreciated

Link to comment
Share on other sites

You must be accidentally clicking on UNIQUE index icon, when creating this field.

On the screen where you define fields , tere are three icons in each row. The first is to create primary key, the second is for UNIQUE index, and the last os for normal index.

 

Anyway, you can always drop the index after you created the table. Either using phpMyAdmin or using:

ALTER TABLE tableName
DROP INDEX indexName;

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.