Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/04/2012, 16:03
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Respuesta: Consultas con select avanzadas

Puedes hacer subconsultas sin problemas, solo crea la sub consulta, por ejemplo:
Código PHP:
Ver original
  1. $sub = $this->getSelect();
  2. $sub->from(array('f' => 'foo'));
  3. $sub->where('bar=baz');
  4.  
  5. $main = $this->getSelect();
  6. $main->from(array('y' => 'atable'));
  7. $main->where('id IN (?)', $sub);

Saludos.