<?php
include "../../inc/inc.koneksi.php";

$kode	= $_POST[kode];
$text	= "SELECT kode_bm,tanggal,nobank,namabank,sum(jumlah) as total FROM jurbm WHERE kode_bm= '$kode' GROUP BY kode_bm";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['tgl']		= $r[tanggal];
	$data['nobank']= $r[nobank];
	$data['nabank']= $r[namabank];	
	$data['total'] = $r[total];
	echo json_encode($data);
}
}else{
	$data['tgl']		= '';
	$data['nobank']= '';
	$data['nabank']= '';	
	$data['total']= '';
	echo json_encode($data);
}
?>