query.bindValue(":day_change", -QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0)));
query.bindValue(":timeslot_duration", -QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
query.bindValue(":active", 1);
+ query.exec();
emitSqlQueryError(query);
aConference["id"] = query.lastInsertId().toString(); // 'id' is assigned automatically
}
query.bindValue(":timeslot_duration", -QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
query.bindValue(":active", 1);
query.bindValue(":id", conferenceId);
+ query.exec();
emitSqlQueryError(query);
aConference["id"] = conferenceId;
}
query.prepare("SELECT id FROM ROOM WHERE xid_conference=:conference_id and name=:name");
query.bindValue(":conference_id", aRoom["conference_id"]);
query.bindValue(":name", aRoom["name"]);
+ query.exec();
emitSqlQueryError(query);
// now we have to check whether ROOM record with 'name' exists or not,
// - if it doesn't exist yet, then we have to add that record to 'ROOM' table
query.prepare("INSERT INTO ROOM (xid_conference,name) VALUES (:xid_conference, :name)");
query.bindValue(":xid_conference", aRoom["conference_id"]);
query.bindValue(":xid_name", aRoom["name"]);
+ query.exec();
emitSqlQueryError(query);
aRoom["id"]= query.lastInsertId().toString(); // 'id' is assigned automatically
//LOG_AUTOTEST(query);
query.prepare("DELETE FROM EVENT_ROOM WHERE xid_conference=:conference_id AND xid_event=:event_id");
query.bindValue(":conference_id", aRoom["conference_id"]);
query.bindValue(":event_id", aRoom["event_id"]);
+ query.exec();
emitSqlQueryError(query);
// and insert new ones
query = QSqlQuery(db);
query.bindValue(":conference_id", aRoom["conference_id"]);
query.bindValue(":event_id", aRoom["event_id"]);
query.bindValue(":room_id", aRoom["id"]);
+ query.exec();
emitSqlQueryError(query);
}
query.bindValue(":xid_conference", aLink["conference_id"]);
query.bindValue(":name", aLink["name"]);
query.bindValue(":url", aLink["url"]);
+ query.exec();
emitSqlQueryError(query);
}