You have to do it like this:
'ORDER BY' => 'rand()',
Note that 'rand()' is in quotes, to send this string to MySQL and call
the SQL rand() function – otherwise, you'd call the rand() function in
PHP and send a random number to MySQL.
In general this is a bad idea, though, since this doesn't mean "select a
random row and return it" – it means "select all rows, order them
randomly, then return the first one", which is going to quickly become
slow if you have more than a couple thousand of rows.
The page_random column John suggested in used for MediaWiki's built-in
random page functionality, and a much better idea. You would use
something like:
'page_random >= ' . wfRandom(),
…in the WHERE condition. See how it's used in MediaWiki:
https://phabricator.wikimedia.org/diffusion/MW/browse/master/includes/speci…
--
Bartosz Dziewoński