Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
@beberlei beberlei
12 lines (9 sloc) 0.378 kb
<?php
// products.php
require_once "bootstrap.php";
$dql = "SELECT p.id, p.name, count(b.id) AS openBugs FROM Bug b ".
"JOIN b.products p WHERE b.status = 'NEW' GROUP BY p.id";
$productBugs = $entityManager->createQuery($dql)->getScalarResult();
foreach($productBugs as $productBug) {
echo $productBug['name']." has " . $productBug['openBugs'] . " open bugs!\n";
}
Jump to Line
Something went wrong with that request. Please try again.