Changeset 64122f1 for src/mvc/event.cpp
- Timestamp:
- 01/18/10 19:38:55 (13 years ago)
- Branches:
- master, qt5
- Children:
- 707cd31
- Parents:
- 18681b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mvc/event.cpp
r18681b3 r64122f1 8 8 int const Event::sTable1ColCount = 9; // see 'toRecord()' for more details 9 9 int const Event::sTable2ColCount = 5; // see 'toRecord()' for more details 10 const QString Event::XID_ACTIVITY = "xid_activity"; 11 const QString Event::START = "start"; 12 13 10 14 11 15 QSqlRecord const Event::sColumns = Event::toRecord(QList<QSqlField>() … … 40 44 } 41 45 42 QList<Event> Event::getByDate(const QDate& date, int conferenceId )46 QList<Event> Event::getByDate(const QDate& date, int conferenceId, QString orderBy) 43 47 { 44 48 QSqlQuery query; 45 49 query.prepare( 46 50 selectQueryJoin2T("id") 47 + QString("WHERE %1.xid_conference = :conf AND %1.start >= :start AND %1.start < :end ORDER BY %1. start").arg(sTable1Name));51 + QString("WHERE %1.xid_conference = :conf AND %1.start >= :start AND %1.start < :end ORDER BY %1.%2").arg(sTable1Name).arg(orderBy)); 48 52 query.bindValue(":conf", conferenceId); 49 53 query.bindValue(":start", convertToDb(date, QVariant::DateTime));
Note: See TracChangeset
for help on using the changeset viewer.