For example, a query from the database returns the following:
connection.query(count, function(err, results){
console.log(results);
});
How should I get the value of 7157?
—-update—–
I looked up the number of records in the table:select count(*) from tablename
Perhaps because of this, the returned object uses count(*) as the attribute name.
Results array
The firstzero
Of objectscount(*)
The property is 7157so
results[0]['count(*)']