Ignore:
Timestamp:
01/28/10 22:55:25 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
8b0bf22
Parents:
83020cd
Message:

search fixed

  • only the dates (range) which contain at least one event are selectable
    • if there is only one event at a specified date - user can't switch to the next/prev date
  • if search gives no results - a message is displayed to inform user about it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r83020cd rbcf67d6  
    320320    execQuery( db, "CREATE TEMP TABLE SEARCH_EVENT ( xid_conference INTEGER  NOT NULL, id INTEGER NOT NULL );");
    321321    // INSERT
    322     QString query = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id) "
     322    QString query = QString("INSERT INTO SEARCH_EVENT ( xid_conference, id ) "
    323323                "SELECT EVENT.xid_conference, EVENT.id FROM EVENT ");
    324324    if( aColumns.contains("ROOM") ){
    325         query += "INNER JOIN EVENT_ROOM ON (EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
     325        query += "INNER JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
    326326        query += "INNER JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
    327327    }
    328328    if( aColumns.contains("PERSON") ){
    329         query += "INNER JOIN EVENT_PERSON ON (EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
     329        query += "INNER JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
    330330        query += "INNER JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
    331331    }
     
    348348bool SqlEngine::execQuery(QSqlDatabase &aDatabase, const QString &aQuery)
    349349{
    350     qDebug() << "\nSQL: " << aQuery;
     350    //qDebug() << "\nSQL: " << aQuery;
    351351
    352352    QSqlQuery sqlQuery(aDatabase);
     
    356356    }
    357357    else{
    358        qDebug() << "SQL OK.\n";
     358       //qDebug() << "SQL OK.\n";
    359359       return true;
    360360    }
Note: See TracChangeset for help on using the changeset viewer.