= CURDATE(); "; // كان المعرّف يُدمج في نص الاستعلام مباشرةً — حقن SQL. try { $stmt = $conRide->prepare($sql); $stmt->bindValue(':driver_id', $driver_id); $stmt->execute(); if ($stmt->rowCount() > 0) { $row = $stmt->fetchAll(PDO::FETCH_ASSOC); printSuccess($row); } else { printFailure("No wallet record found"); } } catch (PDOException $e) { http_response_code(500); echo json_encode(["status" => "error", "message" => "SQL Error: " . $e->getMessage()]); } ?>