[TYPO3-mvc] Help needed for DISTINCT using QOM
Fabien Udriot
fudriot at omic.ch
Thu Apr 21 13:32:02 CEST 2011
Hi all,
Would you have any idea / hint how to do a DISTINCT with extbase 1.3 using the QOM. I didn't find
any clue neither on the ML nor on the Internet. My goal would be to retrieve all DISTINCT countries
from a set of records. Don't know what would be the best approach.
With extbase 1.2, we could do the code above. However $query->statement does not seem to work well
with extbase 1.3. Basically, when I loop in the template, it appears to be the same record at every
loop.
public function findAllCountries() {
$query = $this->createQuery();
$query->statement('SELECT DISTINCT country FROM tx_typo3agencies_domain_model_agency');
return $query->execute();
}
Thanks for help as the problem is quiet urgent for me.
Fb.
More information about the TYPO3-project-typo3v4mvc
mailing list