<?php

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

$q = mysqli_real_escape_string($con,$_GET["q"]);
$limit= mysqli_real_escape_string($con,$_GET["limit"]);
if($_GET['tipBus']=='d')
	$sq_invent=mysqli_query($con ,"SELECT desc_pag,tip_pag FROM dgtippag WHERE desc_pag like '$q%' order by desc_pag limit $limit");
elseif($_GET['tipBus']=='c')
		$sq_invent=mysqli_query($con ,"SELECT * FROM dgtippag WHERE desc_pag like '$q%' OR cod_var='$q' order by desc_pag limit $limit");
while($dt_invent=mysqli_fetch_array($sq_invent)){
if($dt_invent['desc_pag'] !==""){	
    echo $dt_invent['tip_pag'];
}
    
}
?>
