Containerizes application #12

Merged
asohh merged 42 commits from container into main 2025-10-25 16:40:46 +02:00
Showing only changes of commit d9897c57eb - Show all commits

added querry to check if the state sequenceNumber is already present

asohh 2025-10-12 11:26:00 +02:00

View file

@ -68,7 +68,14 @@ CREATE TABLE IF NOT EXISTS sync_state (
v VARCHAR(100)
)
");
$result = $conn -> query("SELECT * FROM sync_state WHERE k='sequenceNumber'");
$table_count = $result -> num_rows;
if ($table_count == 0){
$conn->query("INSERT INTO sync_state (k, v) VALUES ('sequenceNumber', '0');");
}
echo "Database, users, and tables created successfully.\n";