Ver Mensaje Individual
  #7 (permalink)  
Antiguo 13/02/2011, 08:28
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Ayuda con MySQL y PHP

SELECT user, titulo FROM temas INNER JOIN (SELECT user2 FROM amigos WHERE user1 = 1)T1 ON temas.user=T1.user2

o así:
SELECT user, titulo FROM temas WHERE user IN (SELECT user2 FROM amigos WHERE user1 = 1)