Update: 2026-07-06 02:37:04
This commit is contained in:
@@ -325,13 +325,13 @@ function calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanR
|
||||
$sqlComp = "SELECT price_amount AS total_price, (price_amount / price_per_km) AS distance_km
|
||||
FROM scraped_competitor_prices
|
||||
WHERE country_code = :country_code
|
||||
AND (start_lat + 0.0) BETWEEN :min_flat AND :max_flat
|
||||
AND (start_lng + 0.0) BETWEEN :min_flng AND :max_flng
|
||||
AND (end_lat + 0.0) BETWEEN :min_tlat AND :max_tlat
|
||||
AND (end_lng + 0.0) BETWEEN :min_tlng AND :max_tlng
|
||||
AND price_per_km > 0
|
||||
AND created_at >= DATE_SUB(NOW(), INTERVAL 24 HOUR)
|
||||
ORDER BY created_at DESC LIMIT 5";
|
||||
AND start_lat BETWEEN :min_flat AND :max_flat
|
||||
AND start_lng BETWEEN :min_flng AND :max_flng
|
||||
AND end_lat BETWEEN :min_tlat AND :max_tlat
|
||||
AND end_lng BETWEEN :min_tlng AND :max_tlng
|
||||
AND price_per_km > 0
|
||||
LIMIT 5";
|
||||
$stmtComp = $con->prepare($sqlComp);
|
||||
$stmtComp->execute([
|
||||
':country_code' => $cc,
|
||||
@@ -351,11 +351,11 @@ function calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanR
|
||||
$sqlFallback = "SELECT price_amount AS total_price, (price_amount / price_per_km) AS distance_km
|
||||
FROM scraped_competitor_prices
|
||||
WHERE country_code = :country_code
|
||||
AND (start_lat + 0.0) BETWEEN :min_flat AND :max_flat
|
||||
AND (start_lng + 0.0) BETWEEN :min_flng AND :max_flng
|
||||
AND price_per_km > 0
|
||||
AND created_at >= DATE_SUB(NOW(), INTERVAL 24 HOUR)
|
||||
ORDER BY created_at DESC LIMIT 10";
|
||||
AND start_lat BETWEEN :min_flat AND :max_flat
|
||||
AND start_lng BETWEEN :min_flng AND :max_flng
|
||||
AND price_per_km > 0
|
||||
LIMIT 10";
|
||||
$stmtFallback = $con->prepare($sqlFallback);
|
||||
$stmtFallback->execute([
|
||||
':country_code' => $cc,
|
||||
|
||||
Reference in New Issue
Block a user