1 select.inc public SelectQuery::orderRandom()

Implements SelectQueryInterface::orderRandom().

return SelectQuery

Overrides SelectQueryInterface::orderRandom

File

core/includes/database/select.inc, line 1605

Class

SelectQuery
Query builder for SELECT statements.

Code

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