diff --git a/db.js b/db.js index c21faa37..c1a07663 100644 --- a/db.js +++ b/db.js @@ -1778,7 +1778,7 @@ module.exports.CreateDB = function (parent, func) { var query = "SELECT doc FROM events WHERE (nodeid = $1 AND domain = $2"; var dataarray = [nodeid, domain]; if (filter != null) { - query = query + "AND action = $3) ORDER BY time DESC LIMIT $4"; + query = query + " AND action = $3) ORDER BY time DESC LIMIT $4"; dataarray.push(filter); } else { query = query + ") ORDER BY time DESC LIMIT $3";