+ const query =
+ "SELECT * " +
+ "FROM Problems " +
+ "WHERE id = " + pid;
+ db.get(query, callback);
+ });
+}
+
+exports.fetchN = function(vname, uid, type, directionStr, lastDt, MaxNbProblems, callback)
+{
+ db.serialize(function() {
+ let typeLine = "";
+ if (uid > 0)
+ typeLine = "AND id " + (type=="others" ? "!=" : "=") + " " + uid;
+ const query =