11 lines
359 B
PHP
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);
|
|
?>
|