Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/03/2005, 11:50
rvc63
 
Fecha de Ingreso: abril-2004
Mensajes: 27
Antigüedad: 20 años
Puntos: 0
busco alguna manera¨de archivar las noticias no de como crearlas.

este codigo no me resulta

las noticias estan en este formato:

07 de Febrero de 200 en el campo dateofnew de la tabla news

cuando ejecuto este codigo me sale pantalla en blanco sin ningun error.
Código PHP:
include("classes/config.php"); 
$sqlquery "Select dateofnew from news";
        
$queryresult mysql_query($sqlquery);
        
                
//while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
                
while (list($dateofnew) = mysql_fetch_row($queryresult))
        {
        
//echo "  <br> $dateofnew   ";
        
        
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})"$dateofnew$getdate);
    if (
$getdate[2] == "01") { $month _JANUARY; } elseif ($getdate[2] == "02") { $month _FEBRUARY; } elseif ($getdate[2] == "03") { $month _MARCH; } elseif ($getdate[2] == "04") { $month _APRIL; } elseif ($getdate[2] == "05") { $month _MAY; } elseif ($getdate[2] == "06") { $month _JUNE; } elseif ($getdate[2] == "07") { $month _JULY; } elseif ($getdate[2] == "08") { $month _AUGUST; } elseif ($getdate[2] == "09") { $month _SEPTEMBER; } elseif ($getdate[2] == "10") { $month _OCTOBER; } elseif ($getdate[2] == "11") { $month _NOVEMBER; } elseif ($getdate[2] == "12") { $month _DECEMBER; }
    if (
$month != $thismonth) {
        
$year $getdate[1];
        echo 
"<li>$month, $year";
        
$thismonth $month;
    }
   
        
        
        
        
//break;
        
        
        
        
$a++;
        } 
__________________
Home Page | SoloMSN
La base del optimismo es evitar el terror.
- Oscar Wilde

Última edición por rvc63; 24/03/2005 a las 12:06