Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Does the lates mysql support parameter binding in IN parameters



  • query = new QSqlQuery();
    query->prepare("Call log(:usernam,:pass)");
    query->isSelect();
    //query->prepare("SELECT * FROM pumaro.users WHERE (userID = :usernam AND password1 = :pass)");
    query->bindValue(":usernam",QVariant(user),QSql::In);
    query->bindValue(":pass",QVariant(pass),QSql::In);
    query->exec();

    the commented section works fine. but the Call procedure(); returns Size -1. Whats wrong with the code.. Am I doing it Wrong. Any Assistance and advise shall be appreciated.


Log in to reply