Advertisement
Guest User

Untitled

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