I am developing an application using Symfony2 and Doctrine2. I also use Doctrine QueryBuilder. I have this query:
public function getInterpDesberdinak($MarkId)
{
$qb = $this->createQueryBuilder('c')
->select('DISTINCT c.Gordailua, c')
->where('c.MarkIdGordailua = :MarkId')
->setParameter('MarkId', $MarkId);
$Emaitza = $qb->getQuery()->getResult();
return $Emaitza;
}
I would like the result that I would get in $ Emaitza to look. It would be something like:
$ Emaitza [0] ['Gordailua'] = The first value of Gordailua is selected.
and then $ Emaitza [0] [?????] = The first object of type c.
I was a little confused. Thank.
source
share