Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/03/2008, 09:06
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 20 años, 4 meses
Puntos: 2135
Re: Seleccion de registros

Código PHP:
$query = "SELECT DISTINCT `año` FROM `productos`";
$result = mysql_query( $query ) or die( mysql_error() );
while( 
$row = mysql_fetch_row( $result ) ) {
      
printf( "<a href=\"listado.php?year=%s\">Listar año %s</a>", $row[0], $row[0] );
}

mysql_free_result( $result ); 
Saludos.