Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/06/2005, 05:22
Avatar de 8461277
8461277
 
Fecha de Ingreso: diciembre-2002
Ubicación: san juan de los morros
Mensajes: 887
Antigüedad: 21 años, 5 meses
Puntos: 1
Segui el consejo que me dieron, pero no me aroja ningun resultado, en la BD dato tengo fechas menores a 22/08/2005 y no me las trae no la saca de la BD

El codigo lo deje asi:

Código PHP:
<?
$fecha
="20052512"
$anio=substr($fecha,0,4); 
$sem=substr($fecha,4,2); 
$dia=substr($fecha,6,1)+1
$diaanio=date("w",mktime(0,0,0,1,1,$anio)); 
//echo date("d/m/Y",mktime(0,0,0,1,($sem-1)*7+$dia-$diaanio,$anio)); 
$f1=date("d/m/Y",mktime(0,0,0,1,($sem-1)*7+$dia-$diaanio,$anio)); 
echo 
$f1;
//Conexion con la base
mysql_connect("localhost","root","");

//Ejecutamos la sentencia SQL
$result=mysql_db_query("noti_php","select DATE_FORMAT(Fecha2, '%d/ %m/%Y') as Fecha, numero, Titulo from noticias where Fecha2 <  '$f1' ORDER BY Fecha2 ASC ");

?>
<table border= "0" width="95%">
<tr>
<th><div align="left">Fechas</div></th>
</tr>
<?
//Mostramos los registros
while ($row=mysql_fetch_array($result))
{
//echo $row['Fecha'];
echo "<tr><td><A href='../ver_noti_todo2.php?numero=".$row['numero']."'>".$row['Fecha']."</a></td></tr>";
echo 
'<tr><td>'.$row["Titulo"].'<HR></td></tr>';
}
mysql_free_result($result)
?>
Ayuda
__________________
Miguel Padrón :cool: