查詢條件如果是一個數組,建議後面接多一個where單獨查詢字段是否不爲空:
查詢字段是否(不)是Null
where('name', null);
where('title','null');
where('name','not null');
如果你需要查詢一個字段的值爲字符串null或者not null
where('title','=', 'null');
where('name','=', 'not null');
查詢條件如果是一個數組,建議後面接多一個where單獨查詢字段是否不爲空:
查詢字段是否(不)是Null
where('name', null);
where('title','null');
where('name','not null');
如果你需要查詢一個字段的值爲字符串null或者not null
where('title','=', 'null');
where('name','=', 'not null');