0
I’m trying to work with findBy() in an application made in Symfony2. I would like to put two conditions on Findby or mix with Where if possible, but am not getting.
$properties = $em->getRepository('PropertyBundle:Property')->findBy(array(),array('name' => 'ASC'));
I’d like to include the conditions active = '1' to choose only records that contain active(active) status.
$properties = $em->getRepository('CitraxPropertyBundle:Property')->findBy(array(),array('name' => 'ASC'),array('active' => 1));
Why the first array of the
findByis empty?– gmsantos