i have this error
DB Error: Duplicate entry ‘root’ for key 2 : DB Error: Duplicate entry ‘root’ for key 2
i have this error
DB Error: Duplicate entry ‘root’ for key 2 : DB Error: Duplicate entry ‘root’ for key 2
You are trying to insert a value (‘root’) that already exists in the second unique key you’ve specified when creating the table.
i don’t know how to solve that,
At least two possibilities:
If the value has to be unique, and the duplicate value comes from user input, then you could show a message to the user when the query returns a duplicate key error.