Answer the question
In order to leave comments, you need to log in
Why does the function overload all the server's RAM?
There is a code:
async function checkQuery(object) {
i = 0;
while (i < urls[1].length) {
sql = 'SELECT id FROM cases WHERE case_number="' + urls[2][i] + '"';
await connection.execute(sql, function(err, results, fields, rows) {
//console.log('... . Ошибка: ' + err + ', Данные: ' + results[0].objid + ', мета-данные полей: ' + fields + '.');
if(results[0] === undefined) {
console.log('Совпадение не найдено');
i++;
} else {
console.log('Такое дело есть!');
urls[0].splice(i, 1);
urls[1].splice(i, 1);
urls[2].splice(i, 1);
}
});
}
console.log(urls[2].length);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question