f034_sqlite_database #19

Merged
jared merged 34 commits from f034_sqlite_database into development 2025-07-24 14:34:39 +02:00
Showing only changes of commit 8b1b3532fc - Show all commits

View File

@@ -19,9 +19,10 @@ let check_ins_stmt = `INSERT INTO users (name, pw) SELECT 'admin', '${hashed_pw}
db.exec(check_ins_stmt); db.exec(check_ins_stmt);
let users_stmt = `SELECT * FROM USERS`; let users_stmt = `SELECT * FROM USERS`;
const stmt = db.prepare(users_stmt); let stmt = db.prepare(users_stmt);
console.log(`\n`, `*** Users table`);
trachi93 marked this conversation as resolved Outdated

[JB] console.log entfernen

[JB] console.log entfernen
for (const usr of stmt.iterate()) { for (const usr of stmt.iterate()) {
console.log(`xxx ${usr.name} + ${usr.pw}`); console.log(`[r] ${usr.name} + ${usr.pw}`);
} }
// cases table // cases table
@@ -34,4 +35,11 @@ create_stmt = `CREATE TABLE IF NOT EXISTS cases
db.exec(create_stmt); db.exec(create_stmt);
let cases_stmt = `SELECT * FROM cases`;
stmt = db.prepare(cases_stmt);
console.log(`\n`, `*** Cases table`);
for (const usr of stmt.iterate()) {
console.log(`[r] ${usr.name} + ${usr.token} + ${usr.pw}`);
}
db.close(); db.close();