%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emtnaeewxm/www/src/EEM/AchatBundle/Repository/
Upload File :
Create Path :
Current File : /home/emtnaeewxm/www/src/EEM/AchatBundle/Repository/AchatRepository.php

<?php

namespace EEM\AchatBundle\Repository;

/**
 * AchatRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class AchatRepository extends \Doctrine\ORM\EntityRepository
{
    public function findAll()
    {
        return $this->findBy(array(), ['dateAchat' => 'DESC','id' => 'DESC']);
    }

    public function rechercheDate($date_achat,$type)
    {
        $queryBuilder = $this->createQueryBuilder('r');

        $queryBuilder->andWhere('r.dateAchat = :year')
            ->setParameter('year', $date_achat)
            ->andWhere('r.type = :type')
            ->setParameter('type', $type);

        $query = $queryBuilder->getQuery();
        $results = $query->getResult();
        return $results;
    }
}

Zerion Mini Shell 1.0