You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
#3208
Open
ZengXiangJun opened this issue
Nov 14, 2024
· 0 comments
`
var config = {
host: 'xxx',
port: 3306,
user: 'root',
password: 'xxx',
database: 'xxxx',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
};
var mysql = require('mysql2');
var pool = mysql.createPool(config);
var promisePool = pool.promise();
var sql = insert into memo_check_file(openid, relation_id, type, size, url, status, time) values(?, ?, ?, ?, ?, 1, now());
var params = [openid, relation_id, type, size, url];
var [rows, fields] = await promisePool.query(sql, params);
`
Calling like this will occasionally report an error like this,How to solve it?
The text was updated successfully, but these errors were encountered:
`
var config = {
host: 'xxx',
port: 3306,
user: 'root',
password: 'xxx',
database: 'xxxx',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
};
var mysql = require('mysql2');
var pool = mysql.createPool(config);
var promisePool = pool.promise();
var sql =
insert into memo_check_file(openid, relation_id, type, size, url, status, time) values(?, ?, ?, ?, ?, 1, now())
;var params = [openid, relation_id, type, size, url];
var [rows, fields] = await promisePool.query(sql, params);
`
Calling like this will occasionally report an error like this,How to solve it?
The text was updated successfully, but these errors were encountered: