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

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