ok
Direktori : /home2/selectio/www/vijay-gases/apis/ |
Current File : //home2/selectio/www/vijay-gases/apis/get-sku-by-pro-id.php |
<?php ob_start(); session_start(); include "../config/config.php"; $session_id = $_SESSION['vijay_gases']['id']; if(isset($_POST['pro_cylinder_no']) && $_POST['pro_cylinder_no']!='' && $_POST['pro_cylinder_no']!='all' && $_POST['pro_cylinder_no']!='0'){ $statement = $pdo->prepare("SELECT * FROM `tbl_product` WHERE product_name='".$_POST['cylinder_type']."' and cylinder_no='".$_POST['pro_cylinder_no']."'"); $statement->execute(); $totals = $statement->rowCount(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $response=0; if($totals) { foreach($result as $gas_data){ $response=$gas_data['id']; } } echo $response; } ?>