<?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 racorrales WHERE cve_corral like '$q%' order by cve_corral");
elseif($_GET['tipBus']=='d')
		$sq_empresas=mysqli_query($con ,"SELECT * FROM racorrales WHERE des_corral like '$q%' order by des_corral");
while($dt_invent=mysqli_fetch_array($sq_empresas)){
	echo "$dt_invent['des_corral']|$dt_invent['cve_corral']|$dt_invent['id_corral']|$dt_invent['id_corral']\n";
}
?>  