Your IP : 216.73.217.79


Current Path : /var/www/v3.cesa.co.za/src/SessionsBundle/Repository/
Upload File :
Current File : /var/www/v3.cesa.co.za/src/SessionsBundle/Repository/SessionTextValuesRepository.php

<?php

namespace App\SessionsBundle\Repository;

/**
 * SessionTextValuesRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class SessionTextValuesRepository extends \Doctrine\ORM\EntityRepository {

    /**
     * Get the session text values by session ids
     *
     * @param array $sessionIds
     * @return array
     */
    public function findBySessionIds($sessionIds) {

        $qb = $this->createQueryBuilder('stv')
                ->join('stv.sessions', 'se')
                ->where('se.id IN (:sessionIds)')
                ->setParameter('sessionIds', $sessionIds)
                ->andWhere('stv.value_name NOT LIKE :valueName')
                ->setParameter('valueName', '%lastURLLogged%')
        ;

//        echo $qb->getQuery()->getSQL() . "\n";
//        exit;

        return $qb->getQuery()->getArrayResult();
    }

}