Parameter count mismatch on SELECT statement - SQLITE using Bindvalues
-
Hi, I'm currently facing an error where I get "Parameter count mismatch" from query.lastError, my bindvalues are correct (i've tested them).
My query is:
QSqlQuery query(DBT); query.prepare("SELECT Foto, Nombre, Apellido1, Apellido2, Curso, Grupo, FotoHuella FROM usuarios WHERE Nombre=:nombre1 OR Apellido1=:apellido1 OR Apellido2=:apellido2 OR Curso=:curso1 OR Grupo=:grupo1"); query.bindValue(":nombre1", nombre); query.bindValue(":apellido1", apellido1); query.bindValue(":apellido2", apellido2); query.bindValue(":curso1", curso); query.bindValue(":grupo1", grupo); query.exec();In case you where wondering here is where I set up the database:
QSqlDatabase DBT=QSqlDatabase::addDatabase("QSQLITE"); DBT.setDatabaseName("/home/pi/FoodCircleDBT.db"); DBT.open();Thanks in advance.