Answer the question
In order to leave comments, you need to log in
How to do an access check on a database?
We have such a database:
What do you need from it? A check should be made to see if the person with the VKid (who is making the request) has dostuplvl higher or lower than 5 or whatever.
How to do it?
My guesses:
function checkdostup(){
let sql = 'select dostuplvl from dostups';
db.all(sql, [], (err, rows) => {
if (err) {
throw err;
}
rows.forEach((row) => {
console.log(row)
return row.dostuplvl;
});
});
}
if (checkdostup > 5) {
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question