Update: 2026-07-25 18:43:44

This commit is contained in:
Hamza-Ayed
2026-07-25 18:43:44 +03:00
parent 20ea9aa12c
commit e03b9c30d5
16 changed files with 144 additions and 206 deletions
+8 -1
View File
@@ -18,5 +18,12 @@ $stmt->execute();
// Fetch all records as an associative array
$employee_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
jsonSuccess($employee_data ?: []);
// Check if any records were retrieved
if ($employee_data) {
// If records were found, print the data as JSON
jsonSuccess($data = $employee_data);
} else {
// If no records were found, print a failure message
jsonError($message = "No employee records found");
}
?>