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

$q 		= strtolower($_GET["q"]);
$zona 	= $_REQUEST['zona'];
if (!$q) return;

$sqlprod = "SELECT * FROM dl_product where 
				(product_name LIKE '%$q%' or product_code LIKE '%$q%') 
			AND active = 1 LIMIT 0,100";
$prod_conn = $conn->query($sqlprod);
while($prod = $prod_conn->fetch_assoc()){
	
		$name 				= ($prod['product_name']." - ".$prod['product_code']);
		$product_id 		= ($prod['product_id']);
		$product_name 		= ($prod['product_name']);
		$price 				= $prod['hrg_3'];
		

		
		echo "$name|$product_id|$product_name|$price \n";
	}
?>