Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $this->Trips = Doctrine_Query::create()
- ->from('Trip t')
- ->leftJoin("t.Stretches s")
- ->leftJoin("t.Vehicle v")
- ->where('v.id = ?', $vehicle)
- ->andWhere(
- '(s.departure_time >= ? AND '.
- ' s.departure_time <= ? OR'.
- ' s.arrival_time >= ? AND '.
- ' s.arrival_time <= ? )',
- array($fecha_desde ,$fecha_hasta, $fecha_desde ,$fecha_hasta)
- )
- ->fetchArray();
- ?>
Add Comment
Please, Sign In to add comment