Changeset 420:dd73848a3c6c
- Timestamp:
- 06/23/2010 09:41:46 PM (20 months ago)
- Author:
- Dmitry Nezhevenko <dion@…>
- Branch:
- default
- Parents:
- 419:cb5b57b7e390 (diff), 418:db5fa97c4e4c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
- Tags:
- tip
- Message:
-
merge
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r418
|
r420
|
|
| 156 | 156 | myVisitor->removeExpired(); |
| 157 | 157 | myModerator->removeExpired(); |
| | 158 | } |
| | 159 | |
| | 160 | QStringList |
| | 161 | Conference::visits(const QDateTime& from, const QDateTime& to, bool ext, int limit) |
| | 162 | { |
| | 163 | QSqlQuery query=DataStorage::instance() |
| | 164 | ->prepareQuery("SELECT nick, lastaction FROM conference_nicks WHERE conference_id=? " |
| | 165 | "AND lastaction BETWEEN ? AND ? ORDER BY lastaction LIMIT ?"); |
| | 166 | query.addBindValue(id()); |
| | 167 | query.addBindValue(from); |
| | 168 | query.addBindValue(to); |
| | 169 | query.addBindValue(limit); |
| | 170 | |
| | 171 | QStringList list; |
| | 172 | if (!query.exec()) |
| | 173 | return list; |
| | 174 | |
| | 175 | while (query.next()) |
| | 176 | { |
| | 177 | list.append((ext) ? query.value(0).toString()+" (" |
| | 178 | + query.value(1).toDateTime().toString("dd.MM.yyyy HH:mm") |
| | 179 | + ")" : query.value(0).toString()); |
| | 180 | } |
| | 181 | return list; |
| 158 | 182 | } |
| 159 | 183 | |
-
|
r415
|
r420
|
|
| 195 | 195 | { |
| 196 | 196 | query=DataStorage::instance() |
| 197 | | ->prepareQuery("SELECT id from conference_jids WHERE conference_id=? AND jid=?"); |
| | 197 | ->prepareQuery("SELECT id from conference_jids WHERE conference_id=? AND jid=? LIMIT 1"); |
| 198 | 198 | query.addBindValue(myId); |
| 199 | 199 | query.addBindValue(n); |