db_testdata #24

Merged
vex merged 10 commits from db_testdata into develop 2025-04-21 15:11:37 +00:00
3 changed files with 18 additions and 5 deletions
Showing only changes of commit 641d14a2dd - Show all commits

View File

@ -3,8 +3,6 @@ BEGIN
DECLARE i INT DEFAULT 1;
DECLARE emailString CHAR(16) DEFAULT 'test';
DELETE FROM webshop.user;
WHILE i < 100
DO
SET emailString = CONCAT(emailString, CAST(i AS CHAR(16)), '@test.de');

4
package-lock.json generated
View File

@ -9,11 +9,9 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"app-root-path": "^3.1.0",
"dotenv": "^16.4.7",
"express": "^4.21.2",
"app-root-path": "^3.1.0",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"express-session": "^1.18.1",
"mysql": "^2.18.1",
"mysql2": "^3.12.0",

View File

@ -0,0 +1,17 @@
const mysql = require('mysql');
const connection = mysql.createConnection({
host: "localhost",
user: "root",
password: "",
database: "webshop"
})
connection.connect(function (err) {
if (err) throw err
console.log("Connected to database")
connection.query("SELECT * FROM webshop.product LIMIT 10", function (err, result) {
if (err) throw err
console.log(result)
})
})