Forums / Developer / Problem with attribute_filter (AND, OR)
Solène Guillot
Wednesday 29 September 2010 5:26:52 am
Hello,
I would like to do an attribute filter with AND and OR imbricated. It doesn't work. I have eZ 4.0.0.
My code :
'attribute_filter', array( 'or', array( 'event/from_time', 'between', array( $beginmonth, $endmonth )), array( 'event/to_time', 'between', array( $beginmonth, $endmonth ) ), array('and', array( 'event/from_time', '<=', $beginmonth ), array( 'event/to_time', '>=', $endmonth ) ) )
Is it possible ???
Thanks
Ivo Lukac
Wednesday 29 September 2010 6:35:48 am
Hi,
With attribute_filter you can't mix AND and OR. Try making custom extended_attribute_filter or use ezfind fetch.
http://www.linkedin.com/in/ivolukac http://www.netgen.hr/eng/blog http://twitter.com/ilukac
Wednesday 29 September 2010 6:38:09 am
Thank you,
I will try with an extended_attribute_filter
Thursday 30 September 2010 2:17:24 am
Look here: http://kcy.me/aj0
Could be useful.