24 lines
730 B
PHP
24 lines
730 B
PHP
|
<?php
|
||
|
error_reporting(E_ERROR | E_PARSE);
|
||
|
include('includes/config/config.php');
|
||
|
$ohc_id = $_SESSION['current_ohcttype'];
|
||
|
$batch = $_REQUEST['batch_no'];
|
||
|
|
||
|
$sql_stock_item = "select * from item_stock where item_batch_no='" . $batch . "' and ohc_type_id='" . $ohc_id . "' ";
|
||
|
error_log('treatent_batch' . $sql_stock_item);
|
||
|
if (!$result_stock_item = @mysqli_query($conn, $sql_stock_item)) {
|
||
|
exit(mysqli_error($conn));
|
||
|
}
|
||
|
$data = array();
|
||
|
if (mysqli_num_rows($result_stock_item) > 0) {
|
||
|
while ($row_stock_item = mysqli_fetch_assoc($result_stock_item)) {
|
||
|
//extract($row);
|
||
|
$data[] = $row_stock_item;
|
||
|
}
|
||
|
} else {
|
||
|
$data['status'] = 200;
|
||
|
$data['message'] = "Data not found!";
|
||
|
}
|
||
|
|
||
|
echo json_encode($data);
|