Changeset 71c3eb6 for src


Ignore:
Timestamp:
12/12/11 22:34:17 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
4383ab5
Parents:
ac2b0b2
Message:

Fixed by gregoa: Searching for titles where the events had no person did not find anything.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    rac2b0b2 r71c3eb6  
    320320                "SELECT DISTINCT EVENT.xid_conference, EVENT.id FROM EVENT ");
    321321    if( aColumns.contains("ROOM") ){
    322         sql += "INNER JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
    323         sql += "INNER JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
     322        sql += "LEFT JOIN EVENT_ROOM ON ( EVENT.xid_conference = EVENT_ROOM.xid_conference AND EVENT.id = EVENT_ROOM.xid_event ) ";
     323        sql += "LEFT JOIN ROOM ON ( EVENT_ROOM.xid_room = ROOM.id ) ";
    324324    }
    325325    if( aColumns.contains("PERSON") ){
    326         sql += "INNER JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
    327         sql += "INNER JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
     326        sql += "LEFT JOIN EVENT_PERSON ON ( EVENT.xid_conference = EVENT_PERSON.xid_conference AND EVENT.id = EVENT_PERSON.xid_event ) ";
     327        sql += "LEFT JOIN PERSON ON ( EVENT_PERSON.xid_person = PERSON.id ) ";
    328328    }
    329329    sql += QString("WHERE EVENT.xid_conference = %1 AND (").arg( aConferenceId );
Note: See TracChangeset for help on using the changeset viewer.