[TYPO3-mvc] ORDER BY RAND()

Xavier Perseguers typo3 at perseguers.ch
Mon Mar 15 07:17:45 CET 2010


Hi Susanne,

>> You might want to use shuffle($array) instead.
>
> that's what I'm currently doing, but it's not nice, as I have to fetch
> all items first, then shuffle and then splice to get 10 random elements.
> Performance wise at least it would certainly be faster with ORDER BY
> RAND() LIMIT 0,10. What speaks against implementing it?

As far as I'm concerned (even if I'm not ;-), I would like Extbase to try to keep having official TYPO3 SQL being used. I mean SQL that may be parsed by t3lib_sqlparser in order to support other DBMS 
(even if it's still not being very well tested).

Cheers

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-project-typo3v4mvc mailing list