Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/05/2011, 15:53
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Obtener el ultimo elemento asignado

SELECT Nombre FROM estudiantes INNER JOIN (SELECT IDEstudiante FROM relacion WHERE IDlibro = 101 ORDER BY fecha DESC, hora DESC LIMIT 1)T1 on estudiantes.Id = T1.IDEstudiante