1 select.inc public SelectQuery::orderRandom()

Return value

SelectQuery:

Overrides SelectQueryInterface::orderRandom

File

core/includes/database/select.inc, line 1796
Contains classes and interfaces for Select queries.

Class

SelectQuery
Query builder for SELECT statements.

Code

public function orderRandom() {
  $alias = $this->addExpression('RAND()', 'random_field');
  $this->orderBy($alias);
  return $this;
}