<?php
	error_reporting(E_ALL ^ E_DEPRECATED);
	$q=$_GET['q'];
	$my_data=$q;
	require '../connection/conn.php';
	$sql="SELECT distinct * FROM `customer` WHERE customer_name LIKE '%$my_data%' and `cat`='d' and `active`=1";
	$result=$conn->query($sql);
	if($result)
	{
		while($row=mysqli_fetch_array($result))
		{
			echo $row['customer_name']."\n";
		}
	}
?>
<?php /*
	error_reporting(E_ALL ^ E_DEPRECATED);

	$q=$_GET['q'];
	$my_data=mysql_real_escape_string($q);
	$mysqli=mysqli_connect('localhost','root','','madkhal') or die("Database Error");
	$sql="SELECT distinct name FROM `insert` WHERE name LIKE '%$my_data%' ORDER BY barcode";
	$result = mysqli_query($mysqli,$sql) or die(mysqli_error());
	
	if($result)
	{
		while($row=mysqli_fetch_array($result))
		{
			echo $row['name']."\n";
		}
	}*/
?>