<?php
include("../db.php");
error_reporting(0);
 $q = strtolower($_GET["q"]);
if (!$q) return;

 $sql="SELECT media_pur_no as id FROM media_purchase WHERE `media_pur_no` LIKE '%$q%' and return_status!='1' UNION SELECT ink_pur_no as id FROM ink_purchase WHERE `ink_pur_no` LIKE '%$q%' and return_status!='1'";
$rsd = mysql_query($sql);

while($rs = mysql_fetch_array($rsd)) 
{
	$id_me_in= $rs['id'];
	echo "$id_me_in\n";
} 

?>

