Guest User

Untitled

a guest
Jul 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2.  
  3. $this->Trips = Doctrine_Query::create()
  4. ->from('Trip t')
  5. ->leftJoin("t.Stretches s")
  6. ->leftJoin("t.Vehicle v")
  7. ->where('v.id = ?', $vehicle)
  8. ->andWhere(
  9. '(s.departure_time >= ? AND '.
  10. ' s.departure_time <= ? OR'.
  11. ' s.arrival_time >= ? AND '.
  12. ' s.arrival_time <= ? )',
  13. array($fecha_desde ,$fecha_hasta, $fecha_desde ,$fecha_hasta)
  14. )
  15. ->fetchArray();
  16.  
  17. ?>
Add Comment
Please, Sign In to add comment