Duplicate entry for primary key on MySQL
问题 My table just has single column ID (passwords for admin Log-in) Because this code runs every time that program starts, I can prevent errors occurs on creating database and creating tables by using IF NOT EXIXTS statement. Since adminLogin table should be initial first time, When user re-run the program, the Duplicate entry for primary key error occurs. I used IF NOT EXISTS for inserting into table, But there is some another error! My table: Error: 回答1: You are trying to insert same value. PK