V
V
Vladimir2019-06-01 21:19:42
MySQL
Vladimir, 2019-06-01 21:19:42

How to convert mysql object to string?

JSON.strigify() throws error, toString() is undefined, I'm confused

var e_mail = db.query("SELECT * FROM players WHEREemail='"+email+"';");
   	var e_mail = toString(e_mail);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-06-01
@Robur

db.query is definitely asynchronous and doesn't return anything to you right away, at best a promise.
Wait until the data is received from the database, then do something with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question