<?php
require 'config.php';

echo "Latest reviews for user 16:\n";
$result = mysqli_query($conn, "SELECT * FROM ulasan_produk WHERE pengguna_id = 16 ORDER BY id DESC LIMIT 5");
while ($row = mysqli_fetch_assoc($result)) {
    echo "Review ID: " . $row['id'] . ", Product: " . $row['produk_id'] . ", Transaction: " . $row['transaksi_id'] . ", Rating: " . $row['rating'] . ", Review: " . substr($row['isi_ulasan'], 0, 50) . "...\n";
}
