Ecstore关于后端filter条件的表现形式以及含义。

2016-06-21   点击:   发布者:南京互诺科技
名称 表达符 解释
than > $var 大于
lthan < $var 大于
nequal = $var 等于
sthan <= $var 小于等于
bthan >= $var 大于等于
has like %$var% 首尾模糊
head like $var% 首部模糊
foot like %$var 尾部模糊
nohas not like %$var% 首部模糊不等于
between {field}>=$var[0] and {field}< $var[1] 在两个值之间
in in (implode(‘,’,(array)$var)) ) 在多个值里边存在
not in ” not in (implode(‘,’,(array)$var) 在多个值里边不存在

以下是dbeav层面的PHP处理,



$FilterArray= array(

        'than'=>' > '.$var,

        'lthan'=>' < '.$var,

        'nequal'=>' = \''.$var.'\'',

        'noequal'=>' <> \''.$var.'\'',

        'tequal'=>' = \''.$var.'\'',

        'sthan'=>' <= '.$var,

        'bthan'=>' >= '.$var,

        'has'=>' like \'%'.$var.'%\'',

        'head'=>' like \''.$var.'%\'',

        'foot'=>' like \'%'.$var.'\'',

        'nohas'=>' not like \'%'.$var.'%\'',

        'between'=>' {field}>='.$var[0].' and '.' {field}<'.$var[1],

        'in' =>" in ('".implode("','",(array)$var)."') ",

        'notin' =>" not in ('".implode("','",(array)$var)."') ",

   );



window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

相关阅读