Template

catalog

promed

数据库插入

    query.prepare("INSERT INTO 'userinfo' VALUES (:a1, :a2, :a3, :a4, :a5, :a6, :a7, :a8, :a9, :a10, :a11, :a12, :a13, :a14, :a15); ");
    for(int i = 6; i <= 500; ++i){
        query.bindValue(":a1", QString::number(i));
        query.bindValue(":a2", "姓名");
        query.bindValue(":a3", QString::number(i));
        query.bindValue(":a4", QString::number(i));
        query.bindValue(":a5", QString::number(i));
        query.bindValue(":a6", QString::number(i));
        query.bindValue(":a7", QString::number(i));
        query.bindValue(":a8", QString::number(i));
        query.bindValue(":a9", QString::number(i));
        query.bindValue(":a10", QString::number(i));
        query.bindValue(":a11", QString::number(i));
        query.bindValue(":a12", QString::number(i));
        query.bindValue(":a13", QString::number(i));
        query.bindValue(":a14", QString::number(i));
        query.bindValue(":a15", QString::number(i));
        if(!query.exec()){ _WC; }
    }
上一篇:Qt ftp 文件上传工具开发


下一篇:QT C++ WebSocket网络通信应用,多线程运行,服务端+客户端二合一