I am currently using a node.js for the first time trying to use it to SELECT in an sqlite3 database code it connects to the database and even makes an array with 9 results which is the number of entries in my database.
let db = new sqlite3.Database('./dummyuserdata.db', (err) => {
if (err) {
return console.error(err.message);
}
console.log('Connected successfully.');
});
db.all("SELECT * FROM USERDATA",[],(err,rows) => {
console.log(rows)
})
It should select all entries in the database and print them to console.