【发布时间】:2019-07-15 23:01:39
【问题描述】:
我正在尝试将我的代码链接到我的数据库,但我不断收到此错误。我在端口 localhost:8080 远程端口 80 上使用 mac 和 XAMPP。我无法想象为什么我不断收到此错误。代码似乎是正确的。希望有人可以帮助我,因为我的讲师不在,我希望能理解这一点并让它发挥作用。我的数据库似乎也设置正确。还有一些信息我手动放入表格中,希望它会出现在http://localhost:3000
https://github.com/kamrantrea/serverSide2019-/tree/master/tutorial/weekFive
未定义
/Users/admin/Desktop/nodejsmysqltest/routes/index.js:8
connection.query(SELECT * FROM users ORDER BY id DESC, function (err, rows, fields) {
^
TypeError:无法读取未定义的属性“查询”
【问题讨论】:
标签: mysql node.js database xampp localhost