[Dbix-class] Searching N rows sorting randomly
Alberto Simões
hashashin at gmail.com
Sat Nov 28 20:25:32 GMT 2009
Hello, Melo
On Sat, Nov 28, 2009 at 6:18 PM, Pedro Melo <melo at simplicidade.org> wrote:
>>
>> my @words = $schema->resultset('Word')->search(undef,
>> {rows => $LIMIT,
>> order_by =>
>> ...????
>> columns =>
>> ['word']});
>
> Untested but try order_by => \'RANDOM()'
>
> In other places, when you need to put direct SQL, you use a scalar ref.
You're my Bitch :) Thanks :D
ambs
--
Alberto Simões
More information about the DBIx-Class
mailing list