function SelectQuery::orderRandom
File
-
includes/
database/ select.inc, line 1440
Class
- SelectQuery
- Query builder for SELECT statements.
Code
public function orderRandom() {
$alias = $this->addExpression('RAND()', 'random_field');
$this->orderBy($alias);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.