mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 22:25:52 -05:00
Fixed PostgreSQL exception, #3585
This commit is contained in:
parent
43e4a41792
commit
e6d73972a1
2
db.js
2
db.js
@ -1265,7 +1265,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
};
|
||||
obj.GetEventsTimeRange = function (ids, domain, msgids, start, end, func) {
|
||||
if (ids.indexOf('*') >= 0) {
|
||||
sqlDbQuery('SELECT doc FROM events WHERE ((domain = $1) AND (time BETWEEN $2 AND ?)) ORDER BY time', [domain, start, end], func);
|
||||
sqlDbQuery('SELECT doc FROM events WHERE ((domain = $1) AND (time BETWEEN $2 AND $3)) ORDER BY time', [domain, start, end], func);
|
||||
} else {
|
||||
sqlDbQuery('SELECT doc FROM events JOIN eventids ON id = fkid WHERE ((domain = $1) AND (target = ANY ($2)) AND (time BETWEEN $3 AND $4)) GROUP BY id ORDER BY time', [domain, ids, start, end], func);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user