SHARE
TWEET

Untitled

a guest Mar 20th, 2017 352 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.getUser = function (email, password) {
  2.     var values = [email, password];
  3.     var sql = 'SELECT * FROM users WHERE email = ? AND password = ?';
  4.  
  5.     try{
  6.         console.log("kus");
  7.         db.query(sql, values, function (err, results) {
  8.             if (err) throw(err);
  9.  
  10.             if (results = "") {
  11.  
  12.                 return false;
  13.             } else {
  14.                 return true;
  15.             }
  16.             console.log(results);
  17.         });
  18.     }catch (err){
  19.         console.log("ERR" + err);
  20.     };
  21. };
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