Wednesday, February 15, 2017

Duplicate entry '1' for key 'PRIMARY'

My application is working fine in localhost but when i was export my sql file online server suddenly it is showing

Duplicate entry '1' for key 'PRIMARY'

I drop the table and again import server times but no solution though i'm sure i have a primary column with auto increment option.

So later when exporting the sql file from phpmyadmin i click "custom", scoll down and click Add DROP TABLE / TRIGGER statement. then import the sql file again and this  time it worked for me.



No comments:

Post a Comment

Total Pageviews