- QString query = QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_track, type, language, favourite, alarm) VALUES (%1)").arg(values);
- QSqlQuery result (query, db);
- //LOG_AUTOTEST(query);
-
- // add some(text related) Event's items to VIRTUAL_EVENT table
- QString values2 = QString("'%1', '%2', '%3', ? , ? , ? , ? ") \
- .arg(aEvent["conference_id"]) \
- .arg(aEvent["id"]) \
- .arg(aEvent["tag"]);
-
- QString query2 = QString("INSERT INTO VIRTUAL_EVENT (xid_conference, id, tag, title, subtitle, abstract, description) VALUES (%1)").arg(values2);
-
- QSqlQuery result2;
- result2.prepare(query2);
- result2.bindValue(0,aEvent["title"]);
- result2.bindValue(1,aEvent["subtitle"]);
- result2.bindValue(2,aEvent["abstract"]);
- result2.bindValue(3,aEvent["description"]);
- result2.exec();
- //LOG_AUTOTEST(query2);
+ QString query =
+ QString("INSERT INTO EVENT (xid_conference, id, start, duration, xid_track, type, language, tag, title, subtitle, abstract, description, favourite, alarm) VALUES (%1)")
+ .arg(values);
+
+ QSqlQuery result;
+ result.prepare(query);
+ result.bindValue(0,aEvent["tag"]);
+ result.bindValue(1,aEvent["title"]);
+ result.bindValue(2,aEvent["subtitle"]);
+ result.bindValue(3,aEvent["abstract"]);
+ result.bindValue(4,aEvent["description"]);
+ qDebug() << result.lastQuery();
+ result.exec();