语法where('字段名','表达式','查询条件');
表达式列表表达式含义EQ、=等于(=)
NEQ、<>不等于(<>)
GT、>大于(>)
EGT、>&#61;大于等于(>&#61;)
LT、
ELT、<&#61;小于等于(<&#61;)
LIKE模糊查询
[NOT] BETWEEN(不在)区间查询
[NOT] IN(不在)IN 查询
[NOT] NULL查询字段是否(不)是NULL
[NOT] EXISTSEXISTS查询
EXP表达式查询&#xff0c;支持SQL语法
> time时间比较
between time时间比较notbetween time时间比较示例where(&#39;id&#39;,&#39;eq&#39;,100);where(&#39;id&#39;,&#39;&#61;&#39;,100);where(&#39;id&#39;,100);where(&#39;id&#39;,&#39;neq&#39;,100);where(&#39;id&#39;,&#39;<>&#39;,100);where(&#39;id&#39;,&#39;gt&#39;,100);where(&#39;id&#39;,&#39;>&#39;,100);where(&#39;id&#39;,&#39;egt&#39;,100);where(&#39;id&#39;,&#39;>&#61;&#39;,100);where(&#39;id&#39;,&#39;lt&#39;,100);where(&#39;id&#39;,&#39;where(&#39;id&#39;,&#39;<&#61;&#39;,100);where(&#39;name&#39;,&#39;like&#39;,&#39;thinkphp%&#39;);where(&#39;name&#39;,&#39;like&#39;,[&#39;%think&#39;,&#39;php%&#39;],&#39;OR&#39;);where(&#39;id&#39;,&#39;between&#39;,&#39;1,8&#39;);where(&#39;id&#39;,&#39;between&#39;,[1,8]);where(&#39;id&#39;,&#39;not in&#39;,&#39;1,5,8&#39;);where(&#39;id&#39;,&#39;not in&#39;,[1,5,8]);where(&#39;name&#39;, null);where(&#39;title&#39;,&#39;null&#39;);where(&#39;name&#39;,&#39;not null&#39;);where(&#39;title&#39;,&#39;&#61;&#39;, &#39;null&#39;);where(&#39;name&#39;,&#39;&#61;&#39;, &#39;not null&#39;);where(&#39;id&#39;,&#39;in&#39;,&#39;1,3,8&#39;);where(&#39;id&#39;,&#39;exp&#39;,&#39; IN (1,3,8) &#39;);
between time时间比较
notbetween time时间比较
示例where(&#39;id&#39;,&#39;eq&#39;,100);
where(&#39;id&#39;,&#39;&#61;&#39;,100);
where(&#39;id&#39;,100);where(&#39;id&#39;,&#39;neq&#39;,100);
where(&#39;id&#39;,&#39;<>&#39;,100);where(&#39;id&#39;,&#39;gt&#39;,100);
where(&#39;id&#39;,&#39;>&#39;,100);where(&#39;id&#39;,&#39;egt&#39;,100);
where(&#39;id&#39;,&#39;>&#61;&#39;,100);where(&#39;id&#39;,&#39;lt&#39;,100);
where(&#39;id&#39;,&#39;
where(&#39;id&#39;,&#39;<&#61;&#39;,100);where(&#39;name&#39;,&#39;like&#39;,&#39;thinkphp%&#39;);
where(&#39;name&#39;,&#39;like&#39;,[&#39;%think&#39;,&#39;php%&#39;],&#39;OR&#39;);where(&#39;id&#39;,&#39;between&#39;,&#39;1,8&#39;);
where(&#39;id&#39;,&#39;between&#39;,[1,8]);where(&#39;id&#39;,&#39;not in&#39;,&#39;1,5,8&#39;);
where(&#39;id&#39;,&#39;not in&#39;,[1,5,8]);where(&#39;name&#39;, null);
where(&#39;title&#39;,&#39;null&#39;);
where(&#39;name&#39;,&#39;not null&#39;);
where(&#39;title&#39;,&#39;&#61;&#39;, &#39;null&#39;);
where(&#39;name&#39;,&#39;&#61;&#39;, &#39;not null&#39;);where(&#39;id&#39;,&#39;in&#39;,&#39;1,3,8&#39;);
where(&#39;id&#39;,&#39;exp&#39;,&#39; IN (1,3,8) &#39;);