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

Primero, muchas gracias por las molestias que te estás tomando arros, y 2º, tampoco me ha funcionado... he probado por otra vía, pongo el código:

Código PHP:
<div class="NewsItem"> 
                    <h2 class="NewsTitle"><font size="5">EVENTOS</font></h2><br><br> 
                    <table border="0" height="38" cellpadding="0" cellspacing="0"> 
    <tr> 
        <th height="16" align="left" valign="top"> 
        <p align="left"> 
        <img border="0" src="./images/resumen.jpg" height="24" align="left"></th> 
        <th height="16" align="left" valign="top"> 
        <p align="left"> 
        <img border="0" src="./images/tema.jpg" height="24" align="left"></th> 
        <th height="16" align="left" valign="top"> 
        <p align="left"> 
        <img border="0" src="./images/dia.jpg" height="24" align="left"></th> 
    </tr> 

<?php  
//conectamos a la base   
include('conexion.php'); 

$registros=mysql_query("SELECT eventos.*, temas.* FROM eventos INNER JOIN temas ON eventos.id_tema = temas.id_tema",$connect) or
  die(
"Problemas en el select:".mysql_error());
if (
$row=mysql_fetch_array($registros))
{
  echo 
'<tr> 
        <td height="19" valign="top" valign="top" background="./images/bg_eventos.jpg"> 
        <a href="index.php?seccion=evento&id='
.$row["id_evento"].'"> 
        <p align="left"><b> - '
.$row["titulo"].':</b><br><br>'.nl2br($row["resumen"]).'</a></td> 
        <td height="19" valign="top" background="./images/bg_eventos.jpg"> 
        <a href="index.php?seccion=evento&id='
.$row["id_evento"].'"> 
        <p align="center"><img border="0" src="'
.$row["imagen"].'" width="50" height="70"></a></td> 
        <td height="19" valign="top" background="./images/bg_eventos.jpg"> 
        <a href="index.php?seccion=evento&id='
.$row["id_evento"].'"> 
        <p align="center"> - '
.$row["dia"].'</p> 
        </a> 
        </td> 
    </tr> 
    <tr> 
        <td height="5" valign="top" valign="top" background="./images/bg_eventos.jpg"> 
        </td> 
        <td height="5" valign="top" background="./images/bg_eventos.jpg"> 
        </td> 
        <td height="5" valign="top" background="./images/bg_eventos.jpg"> 
        </td> 
    </tr> 
'
;  
}  
 
mysql_free_result($registros
?></table> 
                </div>
Esto funciona perfectamente, espero que a alguien más le sirva

Última edición por Malekith; 06/02/2011 a las 14:32