Hi,
i don't find how i can do "combine" theses query in one :
And then need this too in the query :
just for information, maybe some value can be "empty or null" (dend for sample)
is possible ?
i don't find how i can do "combine" theses query in one :
PHP Code:
$where = [
'active' => true,
'hidden' => false,
'professionId' => $user->get('professionId'),
];
$query = $this->selectBuilderFactory->create()->from('Nomenclature')
->withWhere(
(new ItemBuilder)
->setAttribute('qualified')
->setType('arrayAnyOf')
->setValue( [$user->get('qualified')] )
->build()
)
->build();
$nomenclatures = $this->em->getRDBRepository('Nomenclature')->clone($query)->where($where)->find();
PHP Code:
Cond::and(
Cond::or(
Cond::equal(Cond::column('dend') , null ),
Cond::greaterOrEqual(Cond::column('dend'), $meeting->get('date'))
),
Cond::and(
Cond::lessOrEqual(Cond::column('dbegin'), $meeting->get('date') ),
Cond::greaterOrEqual(Cond::column('dend'), $meeting->get('date'))
Cond::equal(Cond::column('type'), 'Internal'),
Cond::equal(Cond::column('contactId'), $contact->getId() ),
)
)
is possible ?
Comment