Do you have AUTOINCREMENT on your primary keys? You ran php artisan migrate on your production server or you imported a database from somewhere else?
Dec 26, 2019
4
Level 1
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
I just add my laravel project in my cpanel but when I try to add it's showing an error.
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' (SQL: insert into appointments (full_name, phone_number, additional_information, email, department, date_and_time, updated_at, created_at) values (ss, 01754890543, i need help for indian tretment, [email protected], 1, 2019/12/23 22:40, 2019-12-27 08:16:40, 2019-12-27 08:16:40))
it's working fine in localhost but showing this error after adding it to live server.
Level 73
1 like
Please or to participate in this conversation.