Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //check this section code
- function login (username, password, callback) {
- var check = false
- accountDB.serialize(function () {
- var sql = 'SELECT username,password FROM table01 WHERE username=?'
- accountDB.each(sql, [username], function(err, row) {
- console.log(':' + row.password)
- if (row.password === password) {
- check = true
- console.log('check true')
- callback(null, true);
- }
- callback('Username or password is wrong', null);
- })
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement