1
0
mirror of synced 2025-12-28 00:23:25 +00:00

feat(navigate) navigation available and most usefull features)

This commit is contained in:
Valentin
2024-06-13 00:30:42 +02:00
parent 10825d7598
commit ab210c98fe
15 changed files with 335 additions and 108 deletions

View File

@@ -1,9 +1,9 @@
<?php
try {
$conn = new PDO("mysql:host=127.0.0.1", "root", "lynqo");
$conn->exec("CREATE DATABASE IF NOT EXISTS subwaySchedule");
$conn->exec("USE subwaySchedule");
$conn = new PDO("mysql:host=$db_host", $db_user, $db_password);
$conn->exec("CREATE DATABASE IF NOT EXISTS $db_name");
$conn->exec("USE $db_name");
$conn->exec("CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
@@ -14,6 +14,14 @@ try {
is_admin BOOLEAN NOT NULL DEFAULT 0
)");
$conn->exec("CREATE TABLE IF NOT EXISTS favorites (
id INT AUTO_INCREMENT PRIMARY KEY,
userId INT NOT NULL,
stopId INT NOT NULL,
lineId INT NOT NULL,
FOREIGN KEY (userId) REFERENCES users(id)
)");
} catch(PDOException $e) {

View File

@@ -1,5 +0,0 @@
<?php
?>