<?php
require_once 'config.php';

// Check properties table structure
echo "=== Properties Table ===\n";
$result = $mysqli->query("DESCRIBE properties");
if ($result) {
    while ($row = $result->fetch_assoc()) {
        echo $row['Field'] . " - " . $row['Type'] . "\n";
    }
}

echo "\n=== Sample Properties ===\n";
$result = $mysqli->query("SELECT id, title, image_url FROM properties LIMIT 5");
if ($result) {
    while ($row = $result->fetch_assoc()) {
        echo "ID: " . $row['id'] . ", Title: " . $row['title'] . ", Image: " . ($row['image_url'] ?: 'NULL') . "\n";
    }
}

echo "\n=== Services Table ===\n";
$result = $mysqli->query("SELECT COUNT(*) as count FROM services");
if ($result) {
    $row = $result->fetch_assoc();
    echo "Total services: " . $row['count'] . "\n";
}

$mysqli->close();
?>
