Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.connect(function(err, results) {
- if (err) {
- console.log("ERROR: " + err.message);
- throw err;
- }
- var get = getChar(db);
- console.log(get);
- });
- getChar = function(db)
- {
- db.query(
- 'SELECT * FROM simulation_queue WHERE cooldown > UNIX_TIMESTAMP(NOW()) AND simulated=0 ORDER BY cooldown DESC LIMIT 1',
- function selectCb(err, results, fields) {
- if(results.length == 1){
- console.log(results);
- }else{
- return false;
- }
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment