
Query un poco complicada en symfony
Publicado por Dio (2 intervenciones) el 22/01/2015 21:56:49
Tengo esta query
select *
from core_accounting_entry
where date between '2014-12-12' and '2015-12-31'
AND ((accounting_entry_type_id<>20)
or (accounting_entry_type_id=20 and letter_of_agreement_id is null and beneficiary_id is null and beneficiary_type_id is null))
y no estoy seguro de como hacerla en symfony 1.4 , principalmente todo lo que sigue al WHERE. Se que es con el Criteria->add() pero me pierdo
Si alguien puede ayudarme le agradecería!
select *
from core_accounting_entry
where date between '2014-12-12' and '2015-12-31'
AND ((accounting_entry_type_id<>20)
or (accounting_entry_type_id=20 and letter_of_agreement_id is null and beneficiary_id is null and beneficiary_type_id is null))
y no estoy seguro de como hacerla en symfony 1.4 , principalmente todo lo que sigue al WHERE. Se que es con el Criteria->add() pero me pierdo
Si alguien puede ayudarme le agradecería!
Valora esta pregunta


0