Hello,

When I try to mysql insert values with same names, it encourages this error. When I looked at the table column, I see that the row id is always "1" and it doesnt let to add same entry.

http://img267.imageshack.us/img267/4123/sfff.jpg

My question is, how can I add an auto increment id to that column for adding same entry names?

Member Avatar for P0lT10n

when you create the table you can tick auto incremente for that column... try to see options of table and tick auto increment for id...

Member Avatar for P0lT10n

i dont know why you see that, but i think that it would the the NULL ticked... it musn't be ticked, NULL. Dont tick null...

Tried unticked, but same error again. I think, it is a varchar row, and you cant make it auto_inc , maybe you can add another row which is auto_inc. Somebody told me that;

You just need to Alter the table, add a new column (with a name such as 'id'), make it a primary key and make it auto-increment. This will create a primary key that is auto-incremented each time you add a new name, even if that name is the same as others.

What do you think ?

why you are apply auto_increment on 'varchar' aut_username???

Member Avatar for P0lT10n

do this, apply auto increment but not varchar use int, it would work !!!

Thanks but that is not working.

My problem is, I can't add new user if the new user's firstname (aut_username) was used before.

[IMG]http://img339.imageshack.us/img339/1360/asaaak.jpg[/IMG]

I can add new column for firstname, but could you please tell me how to make it that lets you add same entry names.

Member Avatar for P0lT10n

i dont know :S

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.