大于(>)EGT、>=大于等于(>=)LT、"/>
您好,登錄后才能下訂單哦!
語法
where('字段名','表達(dá)式','查詢條件');
表達(dá)式列表
表達(dá)式 | 含義 |
---|---|
EQ、= | 等于(=) |
NEQ、<> | 不等于(<>) |
GT、> | 大于(>) |
EGT、>= | 大于等于(>=) |
LT、< | 小于(<) |
ELT、<= | 小于等于(<=) |
LIKE | 模糊查詢 |
[NOT] BETWEEN | (不在)區(qū)間查詢 |
[NOT] IN | (不在)IN 查詢 |
[NOT] NULL | 查詢字段是否(不)是NULL |
[NOT] EXISTS | EXISTS查詢 |
EXP | 表達(dá)式查詢,支持SQL語法 |
> time | 時(shí)間比較 |
< time | 時(shí)間比較 |
between time | 時(shí)間比較 |
notbetween time | 時(shí)間比較 |
示例
where('id','eq',100); where('id','=',100); where('id',100);
where('id','neq',100); where('id','<>',100);
where('id','gt',100); where('id','>',100);
where('id','egt',100); where('id','>=',100);
where('id','lt',100); where('id','<',100);
where('id','elt',100); where('id','<=',100);
where('name','like','thinkphp%'); where('name','like',['%think','php%'],'OR');
where('id','between','1,8'); where('id','between',[1,8]);
where('id','not in','1,5,8'); where('id','not in',[1,5,8]);
where('name', null); where('title','null'); where('name','not null'); where('title','=', 'null'); where('name','=', 'not null');
where('id','in','1,3,8'); where('id','exp',' IN (1,3,8) ');
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。