Update: 2026-07-25 18:40:38

This commit is contained in:
Hamza-Ayed
2026-07-25 18:40:38 +03:00
parent 4bbc687c15
commit 8d3e63d1c7
9 changed files with 58 additions and 65 deletions
+1 -8
View File
@@ -18,12 +18,5 @@ $stmt->execute();
// Fetch all records as an associative array
$employee_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
// 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");
}
jsonSuccess($employee_data ?: []);
?>