Sarana Kesehatan

Sarana Kesehatan

include ("../c_erda/c_.php");
$kode_kecamatan = "05";
?>

$query = "select max(id) from kode_desa, sarana_kesehatan where kode_desa.kode_desa=sarana_kesehatan.kode_desa and kode_desa.kode_desa like '$kode_kecamatan%' group by sarana_kesehatan.kode_desa asc";
$hasil = mysql_query($query,$koneksi);
while($baris = mysql_fetch_array($hasil))
{
$no++;
$id = $baris["max(id)"];
$query1 = "SELECT kode_desa.nama_desa, sarana_kesehatan.kode_desa, sarana_kesehatan.rumah_sakit, sarana_kesehatan.poliklinik, sarana_kesehatan.puskesmas, sarana_kesehatan.BKIA, sarana_kesehatan.rs_bersalin, sarana_kesehatan.puskesmas_pembantu FROM kode_desa, sarana_kesehatan where kode_desa.kode_desa=sarana_kesehatan.kode_desa and sarana_kesehatan.id = '$id'";
$hasil1 = mysql_query($query1,$koneksi);
$baris1 = mysql_fetch_array($hasil1);
$nama_desa = $baris1[nama_desa];
$rumah_sakit = $baris1[rumah_sakit];
$poliklinik = $baris1[poliklinik];
$puskesmas = $baris1[puskesmas];
$BKIA = $baris1[BKIA];
$rs_bersalin = $baris1[rs_bersalin];
$puskesmas_pembantu = $baris1[puskesmas_pembantu];
$total1 = $total1 + $rumah_sakit;
$total2 = $total2 + $poliklinik;
$total3 = $total3 + $puskesmas;
$total4 = $total4 + $BKIA;
$total5 = $total5 + $rs_bersalin;
$total6 = $total6 + $puskesmas_pembantu;
?>

}
?>

NO NAMA DESA RUMAH SAKIT POLIKLINIK PUSKESMAS BKIA RUMAH SAKIT BERSALIN PUSKESMAS PEMBANTU
Total