Welcome Guest, Not a member yet? Register   Sign In
#1062 - Duplicate entry '0' for key 'PRIMARY'
#1

[eluser]kaloyan[/eluser]
I'm trying to make a database using phpMyAdmin
I'm using XAMPP 3.2.1 and CI 2.1.4
Apace and MySQL are started in XAMPP

so column "id" is set to Primary (not Null)
and column "title" is set to --- (not Null)

then when click on Go on the one that's cheched with Ignore (as the Video Tutorial shows), I get this error: "#1062 - Duplicate entry '0' for key 'PRIMARY'"


SQL query: Edit Edit

INSERT INTO `ci_series`.`test` (

`id` ,
`title`
)
VALUES (
'', 'Some Title'
)
MySQL said: Documentation

#1062 - Duplicate entry '0' for key 'PRIMARY'


Please tell me how to fix it, thank You!
#2

[eluser]Tpojka[/eluser]
Is set `autoincrement` for id?
#3

[eluser]kaloyan[/eluser]
Glad you asked.
Well, that's the point, there is no such option, or I am blind enough to not be able to find it LOL, yes i saw on the tutorial that the speacker is selecting Autoincrement, but there was no such option here...he is showing on Mac I guess, so I thought he's stuff is little bit different and it is not a problem that there is no such option on mine phpAdmin.

..soo teach me master! hahaha
#4

[eluser]Tpojka[/eluser]
1. Make backup of your data.

2. Go to
phpmyadmin -> your database
and in top menu (Structure, SQL, Search, Query, ..., Triggers) find SQL submenu and try with
Code:
ALTER TABLE `yourtable` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY
#5

[eluser]kaloyan[/eluser]
#1146 - Table 'ci_series.table' doesn't exist
#6

[eluser]kaloyan[/eluser]
I found this: http://stackoverflow.com/questions/56655...phpmyadmin

there is one that says: The most current version of phpadmin does not have auto-increment.

I tried this:
"n phpMyAdmin, navigate to the table in question and click the "Operations" tab. On the left under Table Options you will be allowed to set the current AUTO_INCREMENT value", but then this error appears: Can't copy table to same one!
#7

[eluser]Tpojka[/eluser]
Is that production table (with live data) or development one?
It would be best to make another table.
#8

[eluser]kaloyan[/eluser]
i'm sorry, I don't know what ur talking about...i'll just keep searching and so on...
#9

[eluser]Tpojka[/eluser]
1. Go to your `test` table
2. Go to `Structure` menu
3. Check `id` row
4. Click `Change` (you will not change anything)
5. Save Print screen of given window and upload here image or link of that image
#10

[eluser]kaloyan[/eluser]
here




Theme © iAndrew 2016 - Forum software by © MyBB