Files
Anderi Saputra adec71e763 first commit
2026-06-10 17:00:19 +07:00

11 lines
359 B
PHP

<?php
include "koneksi.php";
$rumah_id = intval($_GET['rumah_id'] ?? 0);
$sql = "SELECT * FROM tb_bantuan_history WHERE rumah_id=$rumah_id ORDER BY tanggal DESC LIMIT 20";
$result = $conn->query($sql);
$data = [];
if ($result) { while ($row = $result->fetch_assoc()) { $data[] = $row; } }
header('Content-Type: application/json');
echo json_encode($data);
?>