$query = mysqli_query($mysqli, "SELECT n.id_not,n.titulo_not, n.desc_not, p.* FROM noticias as n INNER JOIN foto as p ON n.id_not=p.id_not WHERE n.id_not='$id'") or die('Hubo un error en la consulta : '.mysqli_error($mysqli));
$query = mysqli_query($mysqli, "SELECT n.id_not,n.titulo_not, n.desc_not, p.* FROM noticias as n INNER JOIN foto as p ON n.id_not=p.id_not WHERE n.id_not='$id'")
or die('Hubo un error en la consulta : '.mysqli_error($mysqli));
while($row=mysqli_fetch_array($query)){
if($row['titulo_not']!=$noticia){
?>
<div class="col-sm-12 col-md-12">
<br>
<h1 style="font-size: 25px; color:#19396A; font-family: soberana;"><?php echo $row['titulo_not']; ?></h1>
<div class="thumbnail">
<p style="font-size: 25px; color:#19396A; font-family: soberana;"><?php echo $row['desc_not']; ?></p>
<?php
$noticia=$row['titulo_not'];
} ?>
<div class=".col-md-8 " style="display: inline-block; ">
<a href="<?php echo $row['ubicacion']; ?>" target="_blank"> <img class="thumbnail img-responsive" id="image" src="<?php echo $row['ubicacion']; ?>" style=" margin:10px; width: 300px; height:230px;" title="<?php echo $row['titulo_not']; ?>"/></a>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>