Reputation: 472
I'm using Doctrine DBAL and in the ORM docs it says, in order to execute a querybuilder query I first have to get a Query object using getQuery method. Unfortunately it looks like in DBAL there's no getQuery method to get the job done, so what's the procedure? get the SQL from getSQL method and execute it separately?
Upvotes: 5
Views: 9098
Reputation: 7745
If you want to retrieve an array you could do
$qb->execute()->fetchAll();
Upvotes: 16