Advertisement
Guest User

Untitled

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