Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/03/2013, 10:22
eduardomxm
 
Fecha de Ingreso: abril-2010
Ubicación: Cancun
Mensajes: 88
Antigüedad: 14 años
Puntos: 2
Respuesta: listar valores combinados de 2 tablas

Tomando la cunsulta que haces

Código:
SELECT hist.observaciones , trab.* FROM trabajos trab , hitorial hist WHERE tra.id_trabajos = hist.id_trabajos LIMIT ...
Yo lo haria asi

Código:
SELECT historial.observaciones , trabajo.* FROM trabajos INER JOIN hitorial USING(id_trabajos) ORDER BY historial.id_historial DESC LIMIT 0 , 
1
O

Código:
SELECT historial.observaciones , trabajos.* FROM trabajos INER JOIN hitorial ON historial.id_trabajos=trabajos.id_trabajos ORDER BY historial.id_historial DESC LIMIT 0 , 1