【发布时间】:2019-07-26 23:48:15
【问题描述】:
我将 express 与 mySQL 数据库一起使用,我想使用 select 语句检索数据。
connection.query('select * from table1', function(err, rows, fields){console.log(rows)}
数据库中的列如下所示:
id, name, producer
数据库中的id是:
100000001200000001
在我收到的 console.log 中:
{id: 10000000120000000, name: "Tim", producer: "Tims"}
如您所见,“1”在 JSON 对象中丢失了。
我不知道问题可能是什么......
【问题讨论】:
-
数据库中是bigint...
标签: javascript mysql node.js json express