芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/www/panel/ajax/getProductPrice.php
0) { $sqlProductData = mysqli_fetch_array($sqlProduct); $sqlOrder = mysqli_query($cn,"select sum(qty) from `tbl_order` where `product_id`='".$sqlProductData['id']."'"); $sqlOrderData = mysqli_fetch_array($sqlOrder); $sqlProductStock = mysqli_query($cn,"select * from `tbl_barcode` where `barcode`='$barcode'"); $stock = mysqli_num_rows($sqlProductStock) - $sqlOrderData['sum(qty)']; $imgAll = explode('$',$sqlProductData['image']); $arr = array("status"=>1, 'distributorPrice'=>$sqlProductData['distributor_price'], 'img'=>$imgAll[0],'stockQty'=>$stock); echo json_encode($arr); } else { $arr = array("status"=>2, 'Msg'=>"Barocde Not Found."); echo json_encode($arr); } } else { $arr = array("status"=>2, 'Msg'=>"Enter correct barcode."); echo json_encode($arr); } ?>