('a'=1or'b'=2)and('c'=3or('d'=4and'e'=5))請(qǐng)不要使用字符串_string,只用_logic和_complex。謝謝...
1 回答

有只小跳蛙
TA貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超8個(gè)贊
$where [ '_complex' ] = [ [ 'a' => 1, 'b' => 2, '_logic' => 'or' ], [ 'c' => 3, '_complex' => [ 'd' => 4, 'e' => 5 ], '_logic' => 'or' ] ]; |
如不提供_logic屬性,則thinkphp使用默認(rèn)屬性and進(jìn)行條件連接。
也就是(結(jié)構(gòu)補(bǔ)充完整):
12345678910111213141516 | $where [ '_complex' ] = [ [ 'a' => 1, 'b' => 2, '_logic' => 'or' ], [ 'c' => 3, '_complex' => [ 'd' => 4, 'e' => 5, '_logic' => 'and' , //這一行可缺損 ], '_logic' => 'or' ] ]; |
- 1 回答
- 0 關(guān)注
- 4816 瀏覽
添加回答
舉報(bào)
0/150
提交
取消