find number of rows in returned mysql result (nodejs)

后端 未结 3 1641
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 04:42

When using felixge\'s mysql for node.js, how can I ask the result object for the number of returned rows? I have a rather expensive query so I don\'t want to run a COU

3条回答
  •  温柔的废话
    2020-12-06 04:58

    If you're using the examples in the readme just look at the length property of the rows object (i.e. rows.length).

提交回复
热议问题