ok
Direktori : /home2/selectio/www/vijay-gases/apis/ |
Current File : /home2/selectio/www/vijay-gases/apis/purchase-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 . "%')"; $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 product_type=3"); $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>'; } ?>