Answer the question
In order to leave comments, you need to log in
How to use the data received after a query in mysql?
I have created a mysql query to the database which should return the largest value of the ID column, i.e. get information about the last ID. When I try to display the result, I get [object Object]. I need a numeric value.
The terminal displays the entire database first, and then the maximum value of the ID field.
If I use just result instead of result[0] when displaying, then nothing changes.
Answer the question
In order to leave comments, you need to log in
Did you try to output like this?
console.log('result:', result[0]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question