Database access · Question 9 of 12
Which call at the end of a QueryBuilder query returns all results as a list of associative arrays?
1 answer is correct. Medium
Show answer
Answer
- A ->executeQuery()->fetchAllAssociative()
Explanation
executeQuery() is meant for SELECT and returns a Result that is read row by row with fetchAssociative() or completely with fetchAllAssociative(). executeStatement() is for INSERT, UPDATE and DELETE and only returns the number of affected rows. execute() and fetchAll() come from older Doctrine versions and no longer exist in TYPO3 v14.