<!--Notice: (c)2013 This page is part of the management program for Tlhomeso Timbers, Gaborone, 
and developed by Customized Software (Pty) Ltd, Gaborone, Botswana. 
Customized Software holds the copyright on the source code on this and all other pages in the 
management program. For more info contact Customized Software on email: info@bwcustomized.com-->

<?php
 include("../include/session.php");
 $table_name = $_SESSION['db_prefix']."_issues";
 $q=$_GET['q'];
 $my_data=mysql_real_escape_string($q);
 //$mysqli=mysqli_connect('localhost','username','password','databasename') or die("Database Error");
 $query="SELECT item_name FROM $table_name WHERE item_name LIKE '%$my_data%' AND emp_id = '". $_SESSION['emp_id']."' AND return_date = '0000-00-00' ORDER BY item_name";
 $result = mySQL_query($query) or die ("Error in query:   $query . * ". mySQL_error());
 if($result)
 {
  while($row=mysql_fetch_array($result))
  {
   echo $row ['item_name']."\n";
  }
 }
?>
