[TYPO3-mvc] Random sorting without custom query?

Felix Oertel mehl at foertel.com
Tue Jul 20 20:11:50 CEST 2010


Hi Tobias,

Am 20.07.10 15:39, schrieb Tobias Pinnekamp:
> is it in any way possible to set an ordering like "RAND()" with the query builder methods?

I think it's not possible at the moment. We would have to introduce a 
constant for that but this would raise some problems as for now the 
orderings are bound to a field and random would not.

In general the query-object is nice to do most of the stuff you have to 
do most of the time, but it can't (and doesn't want to) cover 
everybody's needs. I think it's ok, to use a custom query here.

I personally would prefer to shuffle() the array afterwards and keep my 
query clean.

Someone else into this? Do we need this? I just needed it once and used 
custom query anyway.

regards, foertel


More information about the TYPO3-project-typo3v4mvc mailing list