Skip to content

Instantly share code, notes, and snippets.

@churchthecat
Created February 13, 2020 14:22
Show Gist options
  • Save churchthecat/c0a882ab7cc2fd973b07c782fe18ed58 to your computer and use it in GitHub Desktop.
Save churchthecat/c0a882ab7cc2fd973b07c782fe18ed58 to your computer and use it in GitHub Desktop.
nylon
async function nyLon(akronym, lon) {
const db = await mysql.createConnection(config);
let sql;
let res;
let str;
let akr1 = `${akronym}`;
let lon1 = `${lon}`;
console.info("")
sql = `
UPDATE larare SET lon = (lon1)
WHERE akronym = (akronym1) VALUES (?, ?)
`
res = await db.query(sql, [lon, akronym])
// str = console.table(res);
// str = teacherAsTable(res);
// str = utils.teacherAsTable(res);
// console.info(str)
// return str;
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment