<?php
$query_Recordset2 = "SELECT marca, codigo FROM pieza INNER JOIN piezacodigo ON piezacodigo.id_pieza = pieza.id
INNER JOIN marcapieza ON piezacodigo.id_marca = marcapieza.id WHERE marcapieza.id != '1417ea7e-7f6c-4854-9e23-becf7bb4582a' AND 
marcapieza.id != '2be8c832-3d18-4721-b64f-9dfc16d02c8e' AND marcapieza.id != 'c8730441-b37d-4824-8a40-a00c22ba8979' AND marcapieza.id != 'd794e807-e8e8-4bd1-9b30-3793ea0ff9c4' AND marcapieza.id != 'a8a1e3c2-1ae5-4d4d-a010-b5d12e5da242' AND pieza.id = '" . $row_Recordset1['id']."'";
$Recordset2 = mysqli_query($catalogo, $query_Recordset2) or die(mysqli_error());
$row_Recordset2 = $Recordset2->fetch_assoc();
$totalRows_Recordset2 = $Recordset2->num_rows;
if ($totalRows_Recordset2 > 0){
?>
	<div class="marcas_externas_tab"> 
	<?php
	do{
		echo $row_Recordset2['marca'] . ": " . $row_Recordset2['codigo'] . ".  ";
	}while ($row_Recordset2 = $Recordset2->fetch_assoc());
	?>
	</div>
    <br/>
<?php
}
?>