prepare(" SELECT j.*, c.name as client_name, s.name as status_name FROM jobs j JOIN clients c ON j.client_id = c.id JOIN job_statuses s ON j.status_id = s.id WHERE j.company_id = ? ORDER BY j.created_at DESC "); $stmt->execute([$companyId]); $jobs = $stmt->fetchAll(); require_once __DIR__ . '/includes/header.php'; ?>
| Job ID | Client | Address | Status | UPRN | Created | Actions |
|---|---|---|---|---|---|---|
| #= $job['id'] ?> | = htmlspecialchars($job['client_name']) ?> | = htmlspecialchars($job['address']) ?> | = htmlspecialchars($job['status_name']) ?> | = htmlspecialchars($job['uprn'] ?? 'N/A') ?> | = date('d M Y', strtotime($job['created_at'])) ?> | View Details |