diff options
author | Matthew Strapp <msattr@gmail.com> | 2021-04-16 19:33:08 -0500 |
---|---|---|
committer | Matthew Strapp <msattr@gmail.com> | 2021-04-16 19:33:08 -0500 |
commit | 4c2db76344d78a5cb93b51a1f14e8f5eb945317f (patch) | |
tree | 2f11b8e56ed9b291543019eee094a51d9b354115 /csci4131/hw6/strap012_hw6/dbio.js | |
parent | Fix typos because I am a fool (diff) | |
download | homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar.gz homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar.bz2 homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar.lz homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar.xz homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.tar.zst homework-4c2db76344d78a5cb93b51a1f14e8f5eb945317f.zip |
aaaaaaaaaaaaaaaaaaaaaa
Diffstat (limited to 'csci4131/hw6/strap012_hw6/dbio.js')
-rw-r--r-- | csci4131/hw6/strap012_hw6/dbio.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/csci4131/hw6/strap012_hw6/dbio.js b/csci4131/hw6/strap012_hw6/dbio.js index 538fa5a..ab3ec42 100644 --- a/csci4131/hw6/strap012_hw6/dbio.js +++ b/csci4131/hw6/strap012_hw6/dbio.js @@ -16,10 +16,9 @@ connection.connect(function(err) { console.log("Connected to MYSQL database!"); }); -function passcheck(user,pass) { +async function passcheck(user,pass) { let ret = ''; connection.query('SELECT * FROM tbl_accounts', function(err,rows,fields) { - if (err) throw err; if (rows.length == 0) { console.log("There are no entries in the accounts field!"); @@ -32,8 +31,9 @@ function passcheck(user,pass) { } } } - }); return ret; + }); + } function getContacts() { @@ -68,4 +68,4 @@ var ISBN = '0000002345'; // console.log ("Version 2 values inserted"); // }); - +exports.query = passcheck; |