Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/02/2011, 01:32
Malekith
 
Fecha de Ingreso: abril-2006
Mensajes: 105
Antigüedad: 18 años
Puntos: 11
Respuesta: Mostrar a que tema pertenece un artículo determinado

He probado de la forma que tú me has dicho, pero no ha habido suerte:

Código PHP:
<div class="LeftItem" style="text-align:center;">
<? 
error_reporting
(E_ALL);
//conectamos a la base 
include('conexion.php');
//hacemos las consultas 

$result=mysql_query("select * from eventos ORDER BY id_evento DESC LIMIT 1",$connect); 
$row=mysql_fetch_array($result);

$id_tema=$row['id_tema'];
?>
<?

$result2
=mysql_query("SELECT * FROM temas where id_tema='$id_tema'"$connect); 
$row2=mysql_fetch_array($result2); 

$imagen=$row2['imagen'];

?>
<?php 
//Una vez seleccionados los registros los mostramos para su edici�n 
while($row=mysql_fetch_array($result))  


echo 
'
<h4>&nbsp;&nbsp;<a href="index.php?seccion=evento&id='
.$row["id_evento"].'">'.$row[titulo].'</h4></a><br></div>
<div style="text-align:center;" class="LeftItem">
<a href="index.php?seccion=evento&id='
.$row["id_evento"].'">
<img src="'
.$imagen.'"  alt="Ultimo evento" width="100" height="141" loop="0" border="0" /></a><br>
<font size="2">- Fecha: '
.$row[dia].'</font>
<br/>
'
;  

}  
mysql_free_result($result)
?>
</div>
De todas formas, las '' no me han hecho falta en el código anterior para el array, y me ha funcionado a la perfección... que será, que será...