Bug #81157

Typoscript SELECT: orderBy = rand() fails

Added by Oliver Hübner over 2 years ago. Updated 7 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2017-05-06
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Typoscript, rand, rand(), select
Complexity:
Is Regression:
Sprint Focus:

Description

A Database-Query via Typoscript e.g.

...
table = pages
select {
pidInList = this
orderBy = rand()
}
...

ends with an error, because the ts get rendered the rand() in quoutes

... ORDER BY `rand()` ASC': Unknown column 'rand()' in 'order clause'

History

#1 Updated by Paul Hansen over 1 year ago

Try this:

select.orderBy = rand()
select.selectFields = pages.*,rand()

#2 Updated by Steffen Müller 9 months ago

#3 Updated by Chris W 7 months ago

In TYPO3 9 this seems to be okay.

Also available in: Atom PDF