Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/11/2015, 07:09
harryp
 
Fecha de Ingreso: mayo-2008
Mensajes: 117
Antigüedad: 16 años
Puntos: 8
Respuesta: Fusionar varias consultas en una

Bueno pues ya tengo la solución, un compi me ha ayudado.

Pego la consulta por si a alguien le puede servir de referencia.
Código MySQL:
Ver original
  1. select * FROM `textos`
  2. WHERE `text_id` in
  3.     (SELECT `relacion_texto_categoria_id`
  4.       FROM `relaciones` where `relacion_texto_descendente_id`
  5.             in(SELECT `texto_id` FROM `textos`
  6.             WHERE `texto_nombre` like '%rafa%' and`text_tipo`='tags'))
  7. and `text_tipo`='noticias'



Un saludo.

Última edición por gnzsoloyo; 09/11/2015 a las 07:34 Razón: Mal formateado: ILEGIBLE