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