26 lines
907 B
PHP
26 lines
907 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 item_id,b.item_name,a.qty as stock_qty,a.next_cali as date ,b.reorder_dispensary_level, b.min_dispensary_level from calibration_item_tbl a left join tbl_items b on b.item_id=a.cat_id where month(a.next_cali)=month(DATE_ADD(CURDATE(), INTERVAL 1 MONTH)) order by b.item_name 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);
|
|
|
|
|
|
?>
|