0

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?

3
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by P0lT10n
0

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...

0

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...

0

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 ?

0

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

Edited by P0lT10n: n/a

0

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.

Edited by CasTex: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.