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

$kode	= $_POST[kode];
$text	= "SELECT kode_bk,tanggal,nobank,namabank,sum(jumlah) as total FROM jurbk WHERE kode_bk= '$kode' GROUP BY kode_bk";
$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['nakas']	= $r[namabank];	
	$data['total'] 	= $r[total];
	echo json_encode($data);
}
}else{
	$data['tgl']	= '';
	$data['nobank']	= '';
	$data['nabank']	= '';
	$data['total']	= '';
	echo json_encode($data);
}
?>