以下のようにレコードを取得する際に、
$condition = ['Mytable.id' => $someid];
$query = $this->find('all')->where($condition);
$query->all();//
Nullのレコードを取得する状況について考えます。
$condition = [
'MyTable.id' => $someid,
'MyTable.date IS' => NULL];
$query = $this->find('all')->where($condition);
$query->all();//
これで日付(date)がNULLであるものが取得されます。
“IS”を入力するのを忘れがちなので気をつけましょう。


