[Typo3-dev] ORDER BY RAND() support in pi_list_query()
Christian Zehaczek
warhawk at ufo-base.de
Tue May 11 18:10:46 CEST 2004
Dear TYPO3 Developers,
what about this little hotfix in tslib_pibase::pi_list_query()
--- snip ---
if
(t3lib_div::inList($this->internal["orderByList"],$this->internal["orderBy"]
)) {
// 2004-05-10: Do not prepend table name when sorting by rand(),
ignoring sorting flag
($this->internal["orderBy"] <> "rand()")
? $query.= " ORDER BY
".$table.".".$this->internal["orderBy"].($this->internal["descFlag"]?"
DESC":"").chr(10)
: $query.= " ORDER BY ".$this->internal["orderBy"].chr(10);
}
--- snap ---
This one allowed me to give "rand()" as sorting field, maybe anyone does
like it.
Cheers,
Christian
More information about the TYPO3-dev
mailing list