Verified Commit 1d652c6c authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Fix SQL request

parent 8b0d017a
Pipeline #79807 passed with stage
in 15 seconds
...@@ -450,7 +450,7 @@ void Database::saveEnsemble(Automate& a) const { ...@@ -450,7 +450,7 @@ void Database::saveEnsemble(Automate& a) const {
//Il nous faut prendre de chaque état : ensemble (idEns), indice, label, r, g, b //Il nous faut prendre de chaque état : ensemble (idEns), indice, label, r, g, b
for(unsigned int i = 0 ; i < enseEtats.getNbEtats() ; i++) for(unsigned int i = 0 ; i < enseEtats.getNbEtats() ; i++)
{ {
query.prepare("INSERT INTO Etats VALUES (:ensemble, :indice, ':label', :r, :g, :b)"); query.prepare("INSERT INTO Etats VALUES (:ensemble, :indice, :label, :r, :g, :b)");
query.bindValue(":ensemble", idEns); query.bindValue(":ensemble", idEns);
query.bindValue(":indice", enseEtats.getEtat(i).getIndice()); query.bindValue(":indice", enseEtats.getEtat(i).getIndice());
query.bindValue(":label", QString::fromStdString(enseEtats.getEtat(i).getLabel())); query.bindValue(":label", QString::fromStdString(enseEtats.getEtat(i).getLabel()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment