+ // check if event is already there, i.e. room name changed
+ query = QSqlQuery(db);
+ query.prepare("SELECT * 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"]);
+ if (!query.exec()) qDebug() << "Could not execute SELECT * FROM EVENT_ROOM' query:" << query.lastError();
+ if(query.next()) // event/conference exists --> delete it
+ {
+ 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"]);
+ if (!query.exec()) qDebug() << "Could not execute SELECT * FROM EVENT_ROOM' query:" << query.lastError();
+ }