= CURDATE() - INTERVAL 7 DAY ORDER BY `created_at` DESC LIMIT 10"; $stmt = $con->prepare($sql); $stmt->bindParam(':passenger_id', $passenger_id, PDO::PARAM_STR); $stmt->execute(); $notifications = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($notifications) { jsonSuccess($notifications); } else { jsonSuccess([], "No notification data found"); } ?>