prepare($sql); $stmt->bindParam(':passengerId', $passengerId, PDO::PARAM_STR); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($result) { // Print all promo records jsonSuccess($result); } else { // Print an empty list jsonSuccess([]); } ?>