I'm using Symfony2 and Doctrine to get an array of values from the database. I want a list of values from one field of the database table.
I'm using the following code:
return $this->createQueryBuilder('ad') ->select('ad.extId') ->where('ad.extId is not NULL') ->getQuery() ->getArrayResult(); It returns the following array:
Array ( [0] => Array ( [extId] => 3038 ) ) I would like to revieve the following:
Array ( [0] => 3038 ) Any one an idee to get this direct from Doctrine without an extra foreach loop?