Files
Siro/walletintaleq.intaleq.xyz/v2/main/ride/tips/get.php
2026-06-11 18:22:59 +03:00

32 lines
648 B
PHP

<?php
include "../../connect.php";
$driverID = filterRequest("driverID");
$passendgerID = filterRequest("passendgerID");
$sql = "SELECT
`id`,
`driverID`,
`passendgerID`,
`rideID`,
`tipAmount`
FROM
`tips`
WHERE
`driverID`='$driverID'OR`passendgerID`='$passendgerID'";
$stmt = $con->prepare($sql);
$stmt->execute();
if ($stmt->rowCount() > 0) {
// Fetch the record
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
$count = $stmt->rowCount();
printSuccess( $row);
}
else{
// Print a failure message
printFailure($message = "No wallet record found");
}
?>