1. Read more about QSqlQuery constructors. 2. It should be like this : Qt Code: Switch view QSqlQuery query;query.prepare("SELECT * FROM commandes WHERE id=(:id)");query.bindValue(":id", id);query.exec(); QSqlQuery query; query.prepare("SELECT * FROM commandes WHERE id=(:id)"); query.bindValue(":id", id); query.exec(); To copy to clipboard, switch view to plain text mode
QSqlQuery query;query.prepare("SELECT * FROM commandes WHERE id=(:id)");query.bindValue(":id", id);query.exec();
QSqlQuery query; query.prepare("SELECT * FROM commandes WHERE id=(:id)"); query.bindValue(":id", id); query.exec();
Oh ok nice, from all the website I have looked over none talked about the prepare method, I guess my searching skill is not quite proefficient yet. Anyway Thank you that was really helpfull
Forum Rules
Bookmarks