Advertisement
sanjiisan

Untitled

Sep 14th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. namespace CoderslabBundle\Repository;
  4.  
  5. use Doctrine\ORM\EntityRepository;
  6.  
  7. class BookRepository extends EntityRepository {
  8.  
  9. public function getBadBooks() {
  10. $query = $this->_em->createQuery(
  11. 'SELECT b
  12. FROM CoderslabBundle:Book b
  13. WHERE b.rating < :rating
  14. '
  15. )->setParameter( 'rating', 5 );
  16.  
  17. return $query->getResult();
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement