prepare("SELECT p.nombre, d.desc_corta, d.descripcion FROM productos p left join descripcion d on p.idproducto = d.idproducto left join categorias c on c.idcategoria = p.categoria WHERE c.nombre = ? AND c.idioma = 'espanol' "); $cat = 'Limpieza'; if (isset($_GET['cat'])) { $cat = $_GET['cat']; } $statement->bind_param('s', $cat); $statement->execute(); $statement->store_result(); $statement->bind_result($nombre,$desc,$descripcion); $count=$statement->num_rows; $i=0; $pag=0; while ( $statement->fetch() ) { $i++; if (($i-1) % 6 == 0 && $i > 1 || $i == 1) { echo "
\n"; $pag++; } if(($i-1) % 2 == 0){ echo "
\n"; } $html ="
$nombre

$desc

Ver más
"; echo $html; if($i % 2 == 0) { echo "
"; } # listaproductos if($i % 6 == 0) { echo "
"; } #pagina } ?>