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
https://forums.phpfreaks.com/topic/186533-problem-with-unique-fields/
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;

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.