What is the 'noreq' Filter Type an Alias for?
Posted
by Alan Storm
on Stack Overflow
See other posts from Stack Overflow
or by Alan Storm
Published on 2010-05-21T20:19:05Z
Indexed on
2010/05/21
20:40 UTC
Read the original article
Hit count: 204
I'm looking in to Magento's filtering options (Ecommerce System and PHP Framekwork with an expansive ORM system). Specifically the addFieldToFilter
method. In this method, you specify a SQLish filter by passing in a single element array, with the key indicating the type of filter. For example,
array('eq'=>'bar') //eq means equal
array('neq'=>'bar') //neq means not equal
would each give you a where clause that looks like
where field = 'bar';
where field != 'bar';
So, deep in the bowels of the source, I found a comparison type named
'moreq'
that maps to a >= comparison operator
array('moreq'=>'27')
where field >= 27
The weird thing is, there's already a 'gteq' comparision type
array('gteq'=>'27')
where field >= 27
So, my question is, what does moreq stand for? Is is some special SQL concept that's supported in other databases that the Magento guys wants to map to MySQL, or is it just "more required" and an example what happens when you're doing rapid agile and trying to maintain backwards compatibility.
© Stack Overflow or respective owner