<?php

session_start();
$com="AS";
include("DMMYSQLG.php");
//include("DSA1000.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 coalteve.np_desc1,coalteve.nparte1,coalteve.cod_var FROM coalteve WHERE coalteve.modulo='".$_SESSION['mod_sis']."' AND   np_desc1 like '$q%' order by np_desc1 limit $limit");
elseif($_GET['tipBus']=='c')
		$sq_invent=mysqli_query($con ,"SELECT * FROM coalteve WHERE coalteve.modulo='".$_SESSION['mod_sis']."' AND   nparte1 like '$q%' OR cod_var='$q' order by nparte1 limit $limit");
while($dt_invent=mysqli_fetch_array($sq_invent)){
	
    if(isset($dt_invent['np_desc1'])&&isset($dt_invent['np_desc1'])==''){
            echo '$dt_invent["np_desc1"]';
        }
        if(isset($dt_invent['nparte1'])&&isset($dt_invent['nparte1'])==''){
        echo '$dt_invent["nparte1"]';
        }
}
?>