【发布时间】:2021-12-14 12:49:10
【问题描述】:
带有查询的代码:
var customerData = pool.query('SELECT * FROM customers WHERE
licensenumber = $1 AND phone = $2 ORDER BY id ASC LIMIT 1 ',
[Licensenumber,phone], (error, result) => {
if (error) {
throw error}
res.status(200).json(result.rows)
})
如何从查询中返回结果?
【问题讨论】:
标签: node.js node-mysql node-postgres