作者:手机用户2502931803 | 来源:互联网 | 2023-05-17 03:03
Ihavethisnumber76561197993482001(64bitint)storedasabigint(20)inmydatabase.我有这个号码765611
I have this number 76561197993482001 (64bit int) stored as a bigint(20) in my database.
我有这个号码76561197993482001 (64bit int)作为bigint(20)存储在我的数据库中。
But when I try to fetch it using :
但是当我试着用:
//node.js
query('SELECT * FROM table',function(err,rows){
console.log(rows[0]["id"]);// I get 76561197993482000
});
I get the wrong number. I guess this is because js can't handle 64bit variables.
我打错电话了。我猜这是因为js不能处理64位变量。
I know there are libraries for bigint in js but This number is directly stored in the rows variable. So How can I do?
我知道在js中有bigint的库,但是这个数字直接存储在row变量中。那么我该怎么做呢?
Is there a way to convert it as a text when I send the request?
当我发送请求时是否有办法将其转换为文本?
1 个解决方案