Advertisement
Guest User

Untitled

a guest
Nov 14th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. <?php
  2. $articles = $this->Articles->find()
  3. ->matching('Tags', function (Query $query) {
  4. return $query->where(['OR' =>
  5. ['Tags.name LIKE' => 'CakePHP%']
  6. ['Tags.name LIKE' => 'Chapter-%']
  7. ]);
  8. })
  9. ->distinct('Articles.id');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement