<?php

session_start();
$com="AS";
include("DMMYSQLG.php");
//include("DSA1000.php");
include("DMMYSQLG.php");

$q = mysqli_real_escape_string($con,trim($_GET["q"]));

if($_GET['tipBus']=='c')
	$sq_empresas=mysqli_query($con ,"SELECT * FROM dlempresas WHERE cve_emp like '$q%' order by cve_emp");
elseif($_GET['tipBus']=='d')
		$sq_empresas=mysqli_query($con ,"SELECT * FROM dlempresas WHERE nom_emp like '$q%' order by nom_emp");
while($dt_invent=mysqli_fetch_array($sq_empresas)){
	echo "$dt_invent['nom_emp']|$dt_invent['cve_emp']|$dt_invent['id_empresa']|$dt_invent['id_empresa']\n";
}
?>