Answer the question
In order to leave comments, you need to log in
How to get the number of records in the database and output each value/value/value in turn?
Good afternoon. That's the problem. I need to loop records from the database. But I don't know the number of records or how can I display them all? Without brackets and all this dregs.
So it outputs 1 field without brackets from the first entry
connection.query("SELECT * FROM sms", function(err,res) {
console.log(res.map((item) => item.phone.split("\r")[0])[0]);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question