大于(>)EGT、>=大于等于(>=)LT、"/>
溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

thinkphp-where-表達(dá)式查詢

發(fā)布時(shí)間:2020-08-01 04:36:11 來源:網(wǎng)絡(luò) 閱讀:407 作者:素顏豬 欄目:web開發(fā)

語法

where('字段名','表達(dá)式','查詢條件');

表達(dá)式列表

表達(dá)式含義
EQ、=等于(=)
NEQ、<>不等于(<>)
GT、>大于(>)
EGT、>=大于等于(>=)
LT、<小于(<)
ELT、<=小于等于(<=)
LIKE模糊查詢
[NOT] BETWEEN(不在)區(qū)間查詢
[NOT] IN(不在)IN 查詢
[NOT] NULL查詢字段是否(不)是NULL
[NOT] EXISTSEXISTS查詢
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) ');


向AI問一下細(xì)節(jié)

免責(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)容。

AI