<?php
require_once('../conexion.php');
include('../include/sesiones.php');

$palabra = $_POST['palabra'];
$can=mysqli_query($con,"SELECT *,a.art_id as art_id_art FROM articulos a, articulos_has_bodegas ab where a.art_id=ab.articulos_art_id  
and ab.art_cantidad>0 and a.empresa='$emp_id' and ab.empresa='$emp_id' and a.art_tipo='articulo' and a.art_online='Activo' and a.art_estado='Activo' 
and a.art_nombre_online like '%$palabra%' group by a.art_id limit 10") or die(mysqli_error($con)); 
if($can)
{
	while($load4=mysqli_fetch_array($can))
	{
	   $art_id=($load4['art_id_art']); ?>                       
	    <li style="background-color: #FDFEFE; width: 100%;float: left;" class="lista__item--inner">
	    	<a class="flex lista--enlace" href="articulos_detalles.php?art_id=<?php echo $art_id ?>">
	    	    <?php echo substr ($load4['art_nombre_online'], 0, 55); ?> - <?php echo $load4['art_referencia2']; ?>
	    	</a>
	    </li><?php  
	}
}  
?> 


