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

$kode	= $_POST[kode];
$text	= "SELECT * FROM retur_pj WHERE kode_rj= '$kode' GROUP BY kode_rj";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){
	$data['tgl']			= $r[tanggal];
	$data['kodeplg']	= $r[kode_plg];
	$data['namaplg']	= $r[nama_plg];
	$data['nomorfk']	= $r[nomor_fk];
	$data['tanggalfk']	= $r[tanggal_fk];
	echo json_encode($data);
}
}else{
	$data['tgl']			= '';
	$data['kodeplg']	= '';
	$data['namaplg']	= '';
	$data['nomorfk']	= '';
	$data['tanggalfk']	= '';
	echo json_encode($data);
}
?>