第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Laravel whereNotIn 加上 whereIn 不等于總數(shù)

Laravel whereNotIn 加上 whereIn 不等于總數(shù)

PHP
慕運(yùn)維8079593 2021-07-02 14:53:03
這怎么可能,whereNotIn()再加上whereIn()不等于總數(shù)?運(yùn)行這個(gè):$updatedBreeds = [    86,    113,    // etc ....];DB::enableQueryLog();dump(Breed::count());dump(Breed::whereIn('id', $updatedBreeds)->count());dump(Breed::whereNotIn('id', $updatedBreeds)->count());dd(DB::getQueryLog());返回這個(gè):159390我在這里錯(cuò)過了什么嗎?該whereNotIn()調(diào)用應(yīng)返回 120 個(gè)結(jié)果。
查看完整描述

1 回答

?
ibeautiful

TA貢獻(xiàn)1993條經(jīng)驗(yàn) 獲得超6個(gè)贊

顯然,數(shù)組中的值之一是null。奇怪的是,這導(dǎo)致了這種行為。


這是一個(gè)轉(zhuǎn)儲(chǔ)$updatedBreeds:


[

  0 => 86

  1 => 113

- 2 => null // When I removed this value, the whereNotIn() worked

  2 => 44

  3 => 8

  4 => 54

  5 => 54

  // ...

]


查看完整回答
反對 回復(fù) 2021-07-09
  • 1 回答
  • 0 關(guān)注
  • 457 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)