getcarty Posted December 28, 2009 Share Posted December 28, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/186533-problem-with-unique-fields/ Share on other sites More sharing options...
Mchl Posted December 28, 2009 Share Posted December 28, 2009 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; Quote Link to comment https://forums.phpfreaks.com/topic/186533-problem-with-unique-fields/#findComment-985133 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.