Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/04/2008, 09:05
Avatar de Carlojas
Carlojas
 
Fecha de Ingreso: junio-2007
Ubicación: Shikasta
Mensajes: 1.272
Antigüedad: 16 años, 10 meses
Puntos: 49
Re: Funcion EXTRACT

Prueba así por si necesitas consultar mas datos en el query:
Código PHP:
$s "SELECT EXTRACT( YEAR FROM '2008-04-18') AS nyear"
$result mysql_query($s,$L) or die( mysql_error() );
$datos mysql_fetch_array($result);

echo 
$datos['nyear']; 

Saludos.