0
私はpaginate関数の条件としてIDの配列を使用したいが、このエラーは '値を整数に変換できない'ということになる。しかし、どのように条件を配列のすべての値を探すようにすることができますか?ページング条件で配列を使用する[CakePHP 3]
$friendsid = explode(',', $this->Auth->user('friends'));
$this->paginate = [
'conditions' => [
'Users.id' => $friendsid,
]
];
$this->set('users', $this->paginate($this->Users));
$this->set('_serialize', ['users']);
http://stackoverflow.com/questions/26887511/how-to-create-a-in-clause-in-cakephp-query – ndm
が重複する可能性を[CakePHPクエリで\ IN節を作成する方法は?](http://stackoverflow.com/questions/26887511/how-to-create-a-in-clause-in-cakephp-query) – ahoffner