<?php
include('config.php');

$q 		= strtolower($_GET["q"]);

if (!$q) return;




$sqlprod = "SELECT * FROM mst_product where (pm_name LIKE '%$q%' or pm_code LIKE '%$q%' or pm_barcode LIKE '%$q%') AND pt_autoid = 1 LIMIT 0,300";
$prod_conn = $conn->query($sqlprod);
while($prod = $prod_conn->fetch_assoc()){
	
		$name 				= ($prod['pm_name']);
		$product_id 		= ($prod['pm_autoid']);
		$product_name 		= ($prod['pm_name']);
		$bprice 			= $prod['pm_sprice'];
		$pm_ums 			= $prod['pm_ums'];
		echo "$name|$product_id|$product_name|$bprice|$pm_ums|$num \n";
}
		



?>