<?php
// File: API_KONEKSI/riwayat/cek_status.php
include '../config/koneksi.php';

// Ambil semua status yang unik dari database
$query = "SELECT DISTINCT reservasi_st FROM dat_reservasi";
$result = $conn->query($query);

echo "<h3>Daftar Status yang Tersedia di Database:</h3>";
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $status = $row['reservasi_st'];
        echo "Status: <b>" . ($status == null ? "NULL/KOSONG" : $status) . "</b><br>";
    }
} else {
    echo "Data kosong!";
}
$conn->close();
?>