Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function getInfo(name) {
- let info = await selectInfo(name);
- console.log('info for ',name + ': ' + info.uuid);
- return;
- }
- function selectinfo(name) {
- let selectSQL = "select uuid, name from info where name = ?";
- db.query(selectSQL, name, function(err, rows) {
- if (!rows) {
- console.log('no info found for name: ',name);
- return;
- }
- let info = {
- 'uuid':rows[0].uuid,
- 'name':rows[0].name
- }
- console.log(info);
- return info;
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement