How to convert the mysql object into a string?

JSON.strigify() causing the error, toString () is undefined, I'm confused
var e_mail = db.query("SELECT * FROM players WHEREemail='"+email+"';");
 var e_mail = toString(e_mail);
March 23rd 20 at 18:42
1 answer
March 23rd 20 at 18:44
db.query probably asynchronous and does not return you anything from, at best promis.
Wait until you receive the data from the database, then with them to do something.
In the plan?To set the time after which to enter into a variable?Queries to the database witoout in 0.00027 seconds, what is it? - Garrick commented on March 23rd 20 at 18:47
5cf2cf146ac49348047102.jpeg - Garrick commented on March 23rd 20 at 18:50
WHERE a space after add. - martin_Mante1 commented on March 23rd 20 at 18:53
@martin_Mante1, if only it was so corny, I wouldn't be writing here ticket.Added. - Garrick commented on March 23rd 20 at 18:56
5cf2d7a8a5fb4322418453.jpeg - Garrick commented on March 23rd 20 at 18:59
@Garrick, as I remember all mysql Liba is built on the kalbekov(don't believe Bluebird), so the answer is clear
Better need to read docks - bernadine.Schoen commented on March 23rd 20 at 19:02
@bernadine.Schoen, read, nerd5cf2e034e9ac6319902568.jpeg5cf2e03ab1ec1750477259.jpeg - Garrick commented on March 23rd 20 at 19:05
@Garrickyou 15 years agrisa that YOU didn't threw a code right? Take ANOTHER look at the question and code - bernadine.Schoen commented on March 23rd 20 at 19:08
@bernadine.Schoen, the man knows everything better than anyone, he don't need help. Disagree, he can just deal. - martin_Mante1 commented on March 23rd 20 at 19:11
@Garrick, console.log(fields) and not result - Louisa53 commented on March 23rd 20 at 19:14
@martin_Mante1, already Figured out) - Garrick commented on March 23rd 20 at 19:17

Find more questions by tags Node.jsMySQL