Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $articles = $this->Articles->find()
- ->matching('Tags', function (Query $query) {
- return $query->where(['OR' =>
- ['Tags.name LIKE' => 'CakePHP%']
- ['Tags.name LIKE' => 'Chapter-%']
- ]);
- })
- ->distinct('Articles.id');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement