Changeset 42685b5 in confclerk_git


Ignore:
Timestamp:
09/09/14 21:48:36 (8 years ago)
Author:
gregor herrmann <gregoa@…>
Branches:
master, qt5
Children:
2e08065
Parents:
d942dc3
Message:

Fix SQL query which returned too many rooms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    rd942dc3 r42685b5  
    7474    QString aliasEvent("E");
    7575    QString aliasEventRoom("R");
    76     query.prepare(QString("SELECT %1 FROM %2 %3, %4 %5 WHERE %3.xid_conference = :conf AND %3.start >= :start AND %3.start < :end AND %3.id = R.xid_event ORDER BY %5.xid_room, %3.start, %3.duration").arg(
     76    query.prepare(QString("SELECT %1 FROM %2 %3, %4 %5 WHERE %3.xid_conference = :conf_e AND %5.xid_conference = :conf_r AND %3.start >= :start AND %3.start < :end AND %3.id = %5.xid_event ORDER BY %5.xid_room, %3.start, %3.duration").arg(
    7777                    columnsForSelect(aliasEvent), Event::sTableName, aliasEvent, "EVENT_ROOM", aliasEventRoom));
    78     query.bindValue(":conf", conferenceId);
     78    query.bindValue(":conf_e", conferenceId);
     79    query.bindValue(":conf_r", conferenceId);
    7980    query.bindValue(":start", dayStart.toTime_t());
    8081    query.bindValue(":end", dayStart.addDays(1).toTime_t());
Note: See TracChangeset for help on using the changeset viewer.