CoolFace
Apppublic

NeuralNodeAI/Freelance_Elite

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
db.php19 linesDownload Raw Back to root
1<?php2// db.php - Database connection using SQLite3try {4    // Create (or open) the SQLite database file5    $pdo = new PDO("sqlite:database.sqlite");6    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);7 8    // Automatically create the tasks table if it doesn't exist9    $pdo->exec("CREATE TABLE IF NOT EXISTS tasks (10        id INTEGER PRIMARY KEY AUTOINCREMENT,11        task_name TEXT NOT NULL,12        client_name TEXT NOT NULL,13        status TEXT DEFAULT 'pending',14        created_at DATETIME DEFAULT CURRENT_TIMESTAMP15    )");16} catch (PDOException $e) {17    die("Connection Error: " . $e->getMessage());18}19?>