//$strSQL = "SELECT * FROM sup_invoice WHERE (sup_id LIKE '%$key%' or inv_id LIKE '%$key%' or inv_date LIKE '%$key%' )";
$strSQL = "SELECT * FROM sup_invoice,supplier WHERE (sup_id LIKE '%$key%' or inv_id LIKE '%$key%' or inv_date LIKE '%$key%' ) and sup_invoice.sup_id=supplier.sup_id";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
Error Query [SELECT * FROM sup_invoice,supplier WHERE (sup_id LIKE '%%' or inv_id LIKE '%%' or inv_date LIKE '%%' ) or sup_invoice.sup_id=supplier.sup_id]