【发布时间】:2017-09-29 00:57:44
【问题描述】:
app.js
function showConnect(req, res){
mysql_crawl.query('SELECT full_price, discount_price, quantity, prod_link, images, prod_desc, status FROM `catalogsearch_fulltext` WHERE MATCH(data_index) AGAINST("ครีม") LIMIT 0 , 10', function(error, rows){
res.render('product.html',{related: rows})
})
product.html
<%
for (var i of related){
%>
<%= i %>
<%
}
%>
product.html 上的结果
[object Object] [object Object]
如何在 product.html 中显示所有数据(full_price、discount_price、quantity、prod_link、images、prod_desc)
【问题讨论】:
标签: javascript mysql arrays node.js express