Files
Siro/backend/bot/update_jordan_kazan.php
T

39 lines
1.2 KiB
PHP

<?php
// =========================================================
// backend/bot/update_jordan_kazan.php
// Updates the base pricing for Jordan based on the agreed strategy
// =========================================================
require_once __DIR__ . '/../core/bootstrap.php';
require_once __DIR__ . '/../functions.php';
try {
$con = Database::get('main');
} catch (Exception $e) {
die("Database connection failed: " . $e->getMessage() . "\n");
}
echo "Updating Kazan pricing for Jordan...\n";
// Update the kazan table where country is Jordan
$sql = "UPDATE kazan
SET startPrice = '0.35',
speedPrice = '0.22',
fixedPrice = '0.22',
awfarPrice = '0.19',
normalMinPrice = '0.05',
peakMinPrice = '0.06',
lateMinPrice = '0.05'
WHERE country = 'Jordan' OR country = 'JO'";
$stmt = $con->prepare($sql);
$result = $stmt->execute();
if ($result) {
$rowCount = $stmt->rowCount();
echo "Successfully updated $rowCount row(s) for Jordan in the kazan table.\n";
echo "New Pricing: Base=0.35 JOD, Per Km=0.22 JOD, Per Min=0.05 JOD\n";
} else {
echo "Failed to update kazan table.\n";
}