What’s the difference between getScalarResult and getArrayResult in Doctrine

What’s the difference in using: getScalarResult() and getArrayResult()
when running a query with QueryBuilder in Doctrine:

$query = $this->em->createQueryBuilder();
            ->from(DataSetting::class, 'ds')
            ->andWhere('ds.'.$field.' LIKE :searchField')
            ->setParameter('searchField', $value . '%')



Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *