filter attribute with beetwen
Permalink
Hi,
I would like to know if there are any way to filter an user attribute by the between clause.
Because this isn't working:
$ul->filterByAttribute('user_attribute_key_handle', $min. " AND " .$max, 'BETWEEN');
It handles the $min and $max as string, but they are integers.
Thanks for your rply
I would like to know if there are any way to filter an user attribute by the between clause.
Because this isn't working:
$ul->filterByAttribute('user_attribute_key_handle', $min. " AND " .$max, 'BETWEEN');
It handles the $min and $max as string, but they are integers.
Thanks for your rply
Thank you!
This worked for me...
And also my mistake was that, the attribute type was text, so i had to change it to number, and now everything works well.
$ul->filterByAttribute('user_attribute_key_handle', $min , ">" ); $ul->filterByAttribute('user_attribute_key_handle', $max , "<" );
This worked for me...
And also my mistake was that, the attribute type was text, so i had to change it to number, and now everything works well.
but if you are insisted on using filterByAttribute you can 2 of them, one for bigger and one for smaller: