動的ファインダーは findBy${name} or findBy${name}Or${name} というような使い方をする
$data = $this->People->findByNameOrMail($find, $find);
クエリビルダーは検索条件を分けて書くことができる
演算子も使える
$data = $this->People->find()->where(["name"=>$find]);
$data = $this->People->find()->where(["name like"=>$find]);
// andWhere と orWhere
$arr = explode(",", $find);
$data = $this->People->find()->where(["age >=" => $arr[0]])
->andWhere(['age >=' => $arr[1]])->order(["People.age"=>"asc"]);
$data = $this->People->find()
->order(["People.age" => "asc"])
->order(["People.name" => "asc"])
->limit(3)->page($find);
findの後をmodelのtableで定義しておいて、controllerの呼び出しメソッドで使えるのね。なるほど。