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?
If you want to retrieve an array you could do
$qb->execute()->fetchAll();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With