-
-
Save anonymous/c0f09428a4d1832f67738f83606949e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
function getQuote() { | |
var con = mysql.createConnection({ | |
host: cfg.host, | |
user: cfg.user, | |
password: cfg.password, | |
database: cfg.database | |
}); | |
con.connect(); | |
console.log("3"); | |
con.query("SELECT quotes FROM quotess ORDER BY RAND() LIMIT 1", function (err, result) { | |
console.log("4"); | |
// if (err) throw err; | |
var msg = result[0]; | |
console.log(msg.quotes); | |
con.end(); | |
return msg.quotes; | |
}); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment