<?php
include_once("../../lib/konfig.php");
$bj = $_POST['id'];
$MySQLi = new MySQLi($strDBHostName, $strDBUsername, $strDBPassword, $strDBName);
$query = "select count(kode_fg) as cari_bj_gudang from tb_fg_gudang where kode_fg = '$bj' and tgl_diterima is not null;";
$result = $MySQLi->query($query);
$row = $result->fetch_array();
echo $row['cari_bj_gudang'];
