Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/03/2014, 14:09
Avatar de gnzsoloyo
gnzsoloyo
Moderador criollo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Actualmente en Buenos Aires (el enemigo ancestral)
Mensajes: 23.324
Antigüedad: 17 años, 2 meses
Puntos: 2658
Respuesta: Noticias Relacionadas

Cita:
Iniciado por mrodriguezqui Ver Mensaje
<?php
$Articulos_rel= mysql_query("SELECT * FROM noticias WHERE MATCH (titulo) AGAINST (".$get_date['noticia'].") ORDER BY relevancia; ".$get_date['titulo']."%'");
echo "
<table width=80% align=left>
<tr>
<td class='titulos_tablas' width='50%' align='left' style='font-size:12px;'> Articulos Relacionados</td>
</tr>
";
while ($row = mysql_fetch_array($Articulos_rel))
{
$get_date= mysql_fetch_array(mysql_query ("SELECT DATE_FORMAT(fecharegistro, '%d/%m') AS fecharegistroformat, DATE_FORMAT(fecharegistro, '%Y') AS fecharegistroformat2 FROM noticias WHERE titulo='".$row['titulo']."'"));
echo "
<tr> <td style='padding-top:2px; padding-bottom:2px; padding-left:2px; border-bottom: solid 1px #9C9C9C;' class='c'>
<b>".$get_date['fechaformat']."</b> > <a href='index.php?titulo=".$nombre."&a=noticia=".$ro w['titulo']."' style='font-size:11px;'>".$row['titulo_noticia']."</a>
</td></tr>
";
}
?>

No, mi estimado.
Lo que te piden es que lo pongas así, al menos:
Código PHP:
Ver original
  1. <?php
  2.  
  3. $Articulos_rel = mysql_query("SELECT * FROM noticias WHERE MATCH (titulo) AGAINST (" . $get_date['noticia'] . ") ORDER BY relevancia; " . $get_date['titulo'] . "%'");
  4. echo "<table width=80% align=left>
  5. <tr>
  6. <td class='titulos_tablas' width='50%' align='left' style='font-size:12px;'> Articulos Relacionados</td>
  7. </tr>";
  8. while ($row = mysql_fetch_array($Articulos_rel)) {
  9.     $get_date = mysql_fetch_array(mysql_query("SELECT DATE_FORMAT(fecharegistro, '%d/%m') AS fecharegistroformat, DATE_FORMAT(fecharegistro, '%Y') AS fecharegistroformat2 FROM noticias WHERE titulo='" . $row['titulo'] . "'"));
  10.  
  11.     echo "<tr> <td style='padding-top:2px; padding-bottom:2px; padding-left:2px; border-bottom: solid 1px #9C9C9C;' class='c'>
  12. <b>" . $get_date['fechaformat'] . "</b> > <a href='index.php?titulo=" . $nombre . "&a=noticia=" . $row['titulo'] . "' style='font-size:11px;'>" . $row['titulo_noticia'] . "</a>
  13. </td></tr>";
  14. }
  15. ?>
__________________
¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...
"El problema es la interfase silla-teclado." (Gillermo Luque)