SHARE
TWEET

Untitled

a guest Mar 20th, 2017 312 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.getUser = function (email, password, callback) {
  2.     var values = [email, password];
  3.     var sql = 'SELECT * FROM users WHERE email = ? AND password = ?';
  4.     db.query(sql, values, function (err, results) {
  5.         callback(err, results);
  6.     });
  7.  }
  8.  
  9. service.getUser("email", "abc123", function (err, results) {
  10.     if (err) throw err;
  11.     if(results) ....
  12. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top