Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL problem #6

Open
kllsamui opened this issue Feb 21, 2022 · 0 comments
Open

SQL problem #6

kllsamui opened this issue Feb 21, 2022 · 0 comments

Comments

@kllsamui
Copy link

kllsamui commented Feb 21, 2022

$ node index
Serveur démarré (http://localhost:3000/) !
Connexion réussie à la base de données 'apptest.db'
Création réussie de la table 'Livres'
SQLITE_CONSTRAINT: UNIQUE constraint failed: Livres.Livre_ID

please in

index.js line 36

const sql_insert = `INSERT INTO Livres (Livre_ID, Titre, Auteur, Commentaires) VALUES

change to

const sql_insert = `INSERT or IGNORE INTO Livres (Livre_ID, Titre, Auteur, Commentaires) VALUES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant