<?php
require_once __DIR__ . "/../services/db.php";

function logActivity($conn, $taskId, $projectId, $userId, $action, $details = null) {
    $sql = "INSERT INTO activity_log (task_id, project_id, user_id, action, details)
            VALUES (?, ?, ?, ?, ?)";
    sqlsrv_query($conn, $sql, [
        $taskId,
        $projectId,
        $userId,
        $action,
        $details
    ]);
}
