// CREATE
execQuery( db, "CREATE TEMP TABLE SEARCH_EVENT ( xid_conference INTEGER NOT NULL, id INTEGER NOT NULL );");
// INSERT
- QString query = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id) "
+ QString query = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id ) "
"SELECT EVENT.xid_conference, EVENT.id FROM EVENT ");
if( aColumns.contains("ROOM") ){
- query += "INNER JOIN EVENT_ROOM ON (EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
+ query += "INNER JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
query += "INNER JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
}
if( aColumns.contains("PERSON") ){
- query += "INNER JOIN EVENT_PERSON ON (EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
+ query += "INNER JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
query += "INNER JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
}
query += QString("WHERE EVENT.xid_conference = %1 AND (").arg( aConferenceId );
bool SqlEngine::execQuery(QSqlDatabase &aDatabase, const QString &aQuery)
{
- qDebug() << "\nSQL: " << aQuery;
+ //qDebug() << "\nSQL: " << aQuery;
QSqlQuery sqlQuery(aDatabase);
if( !sqlQuery.exec(aQuery) ){
return false;
}
else{
- qDebug() << "SQL OK.\n";
+ //qDebug() << "SQL OK.\n";
return true;
}
}