ok

Mini Shell

Direktori : /home2/selectio/public_html/vijay-gases/apis/
Upload File :
Current File : //home2/selectio/public_html/vijay-gases/apis/sale-search-api.php

<?php
ob_start();
session_start();
include"../config/config.php";

$cond='where 1=1 ';
$search="";
if(isset($_REQUEST['search_text'])){
    $search .=$_REQUEST['search_text'];
}

$cond .= " AND (tbl_gas.gas_name like '%" . $search . "%' OR tbl_product.cylinder_no like '%" . $search . "%' OR tbl_product.sku like '%" . $search . "%')";
   error_log("SELECT tbl_product.*,tbl_gas.gas_name FROM tbl_product LEFT JOIN tbl_gas ON tbl_product.product_name=tbl_gas.id $cond and tbl_product.product_type=2");
   
   
   
    $statement = $pdo->prepare("SELECT tbl_product.*,tbl_gas.gas_name FROM tbl_product LEFT JOIN tbl_gas ON tbl_product.product_name=tbl_gas.id $cond and tbl_product.product_type=2");
    $statement->execute();
    $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    $totalData = $statement->rowCount();
    
   /*INR Symbolâ‚ą*/
    
    if($totalData>0){
        foreach($emp_data as $res){
            echo '<div onclick="product_selection('.$res['id'].')">
                    Product Name : '.$res['gas_name'].' <br>
                    Cylinder No : '.$res['cylinder_no'].' <br>
                 </div>';
        }
        
    }else{
        echo '<div><center> No Data Found...</center><div>';
    }
    
?>

Zerion Mini Shell 1.0