26 lines
910 B
PHP
26 lines
910 B
PHP
<?php
|
|
include ('includes/config/config.php');
|
|
$data = array();
|
|
error_log("start");
|
|
|
|
$limit = $_REQUEST['limit'];
|
|
$start = $_REQUEST['start'];
|
|
$c = $_SESSION['current_ohcttype'];
|
|
$sql_reorder_items = "SELECT i.item_id, stock_qty ,item_name, i.reorder_dispensary_level, i.min_dispensary_level from tbl_items i left join (select item_id, stock_qty from item_stock_dispensary isd where ohc_location_id='$c') d on i.item_id=d.item_id where stock_qty= 0.00 AND status='1' order by item_id asc LIMIT $start,10";
|
|
error_log("load data" . $sql_reorder_items);
|
|
$results_reorder_items = mysqli_query($conn , $sql_reorder_items);
|
|
|
|
$noRow = mysqli_num_rows($results_reorder_items);
|
|
if($noRow == 0){
|
|
$data = 0;
|
|
}else {
|
|
|
|
while ($row_reorder_items = mysqli_fetch_assoc($results_reorder_items)) {
|
|
$data[]=$row_reorder_items;
|
|
}
|
|
}
|
|
|
|
echo json_encode($data);
|
|
|
|
|
|
?>
|